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

skaffman
  • 398,947
  • 96
  • 818
  • 769
Spiderman
  • 9,602
  • 13
  • 48
  • 56

1 Answers1

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.

Federico Sierra
  • 5,118
  • 2
  • 23
  • 36