Changing the default class loading mechanism of JBoss 4.2.* and WebLogic
Application servers use different class loading/delegation mechanisms. Therefore, we should understand them when deploying enterprise applications. In most cases, we need to override the default class loading behavior of application servers. Suppose your web application wants to load classes from its own class loader first without delegating to parent. Then the following simple configurations will help you to override default delegation pattern in BEA WebLogic (version 8.* or 10) and JBOSS 4.2.*. In WebLogic : Set <prefer-web-inf-classes> to true in WEB-INF/weblogic.xml of your war. Read WebLogic Server application classloading for more information. In JBoss : Set java2ParentDelegation to false in WEB-INF/jboss-web.xml as follows. <loader-repository> org.test:loader=archive-name <loader-repository-config> java2ParentDelegation=false </loader-repository-config> </loader-repository> For more information about JBoss class loading, have a look at JBoss cla...