Hi every body.
I have an application which contains same jar file's with different version... and those jar are my applicaition specific...
Like base.jar which is my applications model module jar files..
There are 3 version of it.
Like base-1.0.jar, which is the initial one,
base-2.0.jar which is later contains some files which are already there in base-1.0.jar but modified....
and last base-sp.jar which is appliaction specific jar file...
what i want to do is.... my war file contians base-sp.jar........ in web-inf/lib
this jar file should be ovverriden by base-2.0.jar and
base-2.0.jar should ovverride base-1.0.jar..
while loading the classes................
when application is running...... class loader should first look into base-spec.jar for the class if it is not found then should look into base-2.0.jar and it doesnt find it their then it should go to base-1.0.jar
base-sp.jar -> in your war file in [ web-inf/lib ]
base-2.0.jar -> in server lib folder in [ /jboss-as/server/<PROFILE>/lib ]
base-1.0.jar -> in JBoss lib folder in [ /jboss-as/lib ]
Now when you hit your application which is kept in the [/jboss-as/server/<PROFILE>/deploy] then the in case of WAR files the application would pick up the base-sp.jar first and if its not found any jar in WAR then it would look into [ /jboss-as/server/<PROFILE>/lib ] which has base-2.0.jar and if that too is not found then it would look into [ /jboss-as/lib ] which has base-1.0.jar this way your requirement is fulfilled.
Try this out
Come, Join Us and Experience The Magic…