Let me clarify my question
1. I want to tell deploy/war1.war, deploy/war2.war, hey you two guys, you are referecing the jars in c:/temp/lib and all these referenced jars are loaded by the same classloader and none of the other deployed wars reference these jars.
2. I want a hierarchical (with directories) placement of jars under $JBOSS_HOME/server/default/lib/
Can these be done?
I kind of found a solution, simply by using the class-path in my manifest.mf to reference my jars
however Is there any possibility to use absolute file paths? in class-path manifest.mf? perhaps using file:/ (i tried the following with no success)
I kinda have a solution but i have not tried it yet.
You can scope classloaders in jboss, lookup the jboss docs if u want an example. So what you can do is create all the jars scoped with a classloader, say A and use the same scoped classloader for all the wars as well. This way, none of the other deployed unitswill use that classloader.
What i mean is, create an ear containing all the jars in the lib directory that u want ur war files to reference and create a jboss-app.xml that contains a
and use the same loader-repository for all ur wars.
I searched in the documentation I understood that
will use its own classloader but What I do not understand is if I use that loader-repository tag, where do I place my common jars? and how do I reference them from my .war's ?
I have tried that in my jboss-app.xml and truely I can scope and "de"scope classes, however can I defined multiple loader-repository in the same jboss-app.xml so that I could specify - this class is loaded by this class loader and this one is by this class loader etc?
The answer is yes, I found the solution in jboss-web.xml I specified