views:

52

answers:

1

I'd like to know if the default behavior of JBoss server (4.2.3.GA in my case) is loading the classes in parent-first or parent-last mode. And in case it work as I suspect in parent-last mode (i.e. first trying to load classes from the application's WEB-INF/lib and only if they are not found go to server\lib), how can I configure it to work in the opposite- first trying to load classes from outside and only looking inside the application afterwards.

A: 

It sounds like you need to set

java2ParentDelegation={false|true}

in your jboss-app.xml or jboss-web.xml. See this article for more information.

Brian Agnew
OK, but what is the default behavior of JBoss out-of-the-box? The article that you refered to, said that the class hierarchy is flat. so in case I have one class version in the app's WEN-INF\lib and another version of the same class in <JBoss-root>/server/default/lib than which one will be loaded?
Spiderman
according to the above article when using 'java2ParentDelegation=false' the order of loading will be: 1. WEB-INF/lib (for WARs) 2. libraries in server/default/lib 3. tomcat-libraries in server/default/deploy/jbossweb-tomcat50.sar (jboss-3.2.6). So, when using 'java2ParentDelegation=true' than the order will be in the opposite direction??? let me know and I could mark an answer to this question
Spiderman