In Jboss how can we place a JAR which not in server/default/lib folder in global classpath?
To be more specific I have a JAR (lets call it app-framework.jar) file which has some common classes, these common classes are required in multiple WARs. Also, this single JAR contains a manifest entry for Class-Path which points to all dependent JARs example spring framework, log4j etc.
Now at the startup of JBoss I want to load app-framework.jar which inturn should load all the jars which are in manifest Class-Path entry. E.g. I have a common abstract spring controller defined in app-framework.jar, and concrete spring controllers in respective WARs will extend this abstract spring controller from app-framework.jar.
Main reason why i want to follow this approach is
a) The WAR will only contain the application specific classes and there will be no JARs in web-inf/lib folder. This will reduce the WAR size.
b) I want to have one library (app-framework.jar) to be used for all web applications. So whenever my framework changes i will only deploy the app-framework.jar and recycle the server. Maintainability becomes easier for me.
Please provide your insights to the above scenario in Jboss. BTW I am using Jboss version 4.2.3