JBoss class loader order - another try to understand it
Asked Answered
C

1

6

when I deploy an application on JBoess 5.1 Jboss takes 3rd party jars from 3 different optional places that I am aware of:
1. my-app/WEB-INF/lib
2. [JBoss root]/lib
3. [JBoss root]/server/all/lib

my options to configure jboss-web and hence modify JBoss' class loading that I am aware of are as following:
option1:

<jboss-web>
   <class-loading> 
      <loader-repository>com.example:archive=unique-archive-name</loader-repository> 
   </class-loading>
</jboss-web>

option 2:

<jboss-web>
   <class-loading java2ClassLoadingCompliance="false">
      <loader-repository>
         com.example:archive=unique-archive-name
         <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      </loader-repository>
   </class-loading>
</jboss-web>

option 3:

<jboss-web>
   <class-loading java2ClassLoadingCompliance="true">
      <loader-repository>
         com.example:archive=unique-archive-name
         <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      </loader-repository>
   </class-loading>
</jboss-web>

while trying those options I got different deployment exception when trying the different options.
My question: what is the order of the 3 jar folders that I mentioned above in each one of those options. those links of JBoss didn't help me to understand the different behavior:
link1
link2

Convexoconvex answered 13/2, 2011 at 16:18 Comment(0)
C
0

Check out these links:

Solving JBoss 5 classloading issues

useJBossWebClassLoader in JBoss5

JBoss 5 adds the concepts of custom meta data files, one of which is jboss-classloading.xml which let you define exactly how the war classloader is constructed.

Catechumen answered 29/9, 2014 at 5:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.