JBoss ClassLoader Logic
Is there any logic to how JBoss puts all WARs, EARs and their accompanying JARs into the same ClassLoader? It seems logical that I should be able to deploy different versions of a JAR in different WARs. This works fine on Tomcat, but doesn't seem to on JBoss. Is there someway to turn this segmentation on?
To answer your question : you should have a look at the "UseJBossWebLoader" attribute in your jboss-service.xml.
BTW, you might be interested by this blog entry (from my own blog) :
http://jroller.com/comments/julien.dubois?anchor=the_jboss_classloader_from_hell
HTH,
Julien.
Posted by Julien Dubois on February 25, 2005 at 03:21 PM MST #
in your apps jboss-app.xml. See http://members.capmac.org/~orb/blog.cgi/tech/java/jboss_ucl.html & http://docs.jboss.org/jbossas/admindevel326/html/ch2.chapter.html#ch2.scopedapp.ex although I don't use JBoss myself, so can't verify it works...
Posted by Gwyn Evans on February 25, 2005 at 03:31 PM MST #
Posted by Rob Kischuk on February 25, 2005 at 03:44 PM MST #
Posted by Rob Kischuk on February 25, 2005 at 03:46 PM MST #
1. In $JBOSS_HOME/server/default/deploy/jbossweb-tomcat50.sar/META-INF/jboss-service.xml (assuming we're talking about the "default" server), inside the <mbean code="org.jboss.web.tomcat.tc5.Tomcat5" name="jboss.web:service=WebServer"> tag, make sure <attribute name="UseJBossWebLoader">false</attribute> is present. I belive its value defaults to true.
2. In $JBOSS_HOME/server/default/conf/jboss-service.xml, ensure that the following tags are present among the mbean definitions:
I'm pretty sure the "jboss.j2ee:service=EARDeployer" mbean is defined in there by default, but the attribute values allow classpath promiscuity by default. These values should make you happy.
I'm told the better solution is to use JBoss 4. I think it conforms to the J2EE spec by default in this regard, but we don't use it in production yet, so I'm stuck with this silliness for now.
Posted by Tim Berglund on February 25, 2005 at 04:02 PM MST #
Posted by Tim Berglund on February 25, 2005 at 04:06 PM MST #
Posted by Matt Raible on February 25, 2005 at 04:15 PM MST #
Posted by Anil Gangolli on February 27, 2005 at 04:51 PM MST #
Posted by Anbu on April 27, 2006 at 06:00 PM MDT #
Posted by Matt Raible on April 28, 2006 at 03:26 AM MDT #
Posted by Pablo Molina on September 26, 2007 at 08:25 AM MDT #