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.
org.test:loader=archive-name
<loader-repository-config>
</loader-repository-config>
</loader-repository>
For more information about JBoss class loading, have a look at JBoss classloading configuration guide
No comments:
Post a Comment