Hello,
We have several .war files deployed to JBoss that all need to point to an external framework.jar file.
We do not want to put this .jar file into web-inf/lib, as we do not want to repackage the applications each time a new framework.jar is made available.
However this framework.jar file must be loaded into the application's classloader, and not a shared classloader.
I need to be able specify an application classpath for the .war file.
I did try setting the .war file's manifest.mf class-path attribute, and it did kind of work. However the .jar was loaded into the shared classloader, and not the application specific classloader. This will not work in my case, as the framework.jar file has some static variables and is not multiple application safe.
What is the best approach?
Bonus question:
I would like
applicationA to use c:/lib/framework/v1/framework.jar
applicationB to use c:/lib/framework/v1/framework.jar
applicationC to use c:/lib/framework/v2/framework.jar
applicationD to use c:/lib/framework/v3/framework.jar
Ideally I would be able to set the following env variables
applicationA_classpath=c:/lib/framework/v1/framework.jar
applicationB_classpath=c:/lib/framework/v1/framework.jar
applicationC_classpath=c:/lib/framework/v2/framework.jar
applicationD_classpath=c:/lib/framework/v3/framework.jar
without touching or redeploying the .war files. Restarting Jboss is ok.
Is there anyway to get an env variable into the application specific classpath? Or similar approach without modifying or redeploying the .war files?
Any advice would be truly appreciated,
Pat