[jboss-user] [EJB 3.0] - Loading different versions of same jar in ear application
rrkulkarni
do-not-reply at jboss.com
Sat Oct 4 09:29:32 EDT 2008
Env: JBoss 4.2.2 GA EJB 3 JDK 1.5.0.15
I have a jar with version 0 inside ear in lib folder. It is available to all the web and ejb modules. If I want to use higher version in web module I simple put new jar in WEB-INF/lib folder and it works fine. I am unable to do the same for ejb module. If I put a different version of jar inside ejb module it will not be loaded by jboss. It will use the jar in ear/lib folder only. It loads jar in ejb module fine if I delete the jar in ear/lib folder.
Is there a way I can use one version of jar in ear/lib folder and another version inside ejb module?
I like the class loading scheme for web modules. It loads web module specific jars first without worrying about already loaded jars and if not found then it will look to the parent. Makes perfect sense. Web module can choose to use already existing version or use a new updated one with no effect on other modules.
This does not work for ejb modules. It will first check if a jar is already loaded and use the same if alreday loaded. If it is not loaded then it will check if it exists in ejb module itself. It is forced to use the jar if it is loaded by classloader. It cannot use a better/different version of jar if it wants. So basically all ejb modules are forced to use the jar version in ear/lib folder.
Is there a work around or am I simply missing something.
Thanks a lot
Ravi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180396#4180396
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180396
More information about the jboss-user
mailing list