因此过去在JBoss 3.0下部署的两个ear包,如果其中有公用的组件,JBoss 3.0不会报错,但是JBoss 3.2就会报出: Duplicate class found出错
banq
2003-11-01 21:32
JBoss's class loading architecture needs a little getting used to.
JBoss uses the concept of class loader repository. For any dynamically deployed file, such as EAR, WAR, EJB jar, RAR, and SAR files each is loaded with a new subordinate class loader. However they also register themselves with a loader repository.
These class loaders will first ask the repository and then load classes from themselves.
They may also decide to become the head of a new loader repository. Classes loaded into child loader repositories are not visible to parent loader repositories.
The order in which the class loaders are added to the repository do matter.
The Russian doll model.
Add this jboss-app.xml along side with application.xml: