In the jboss.xml file there is a "loader-repository" element designed to permit 
two EARs with similar contents to be deployed without interference.

The modules inside an application often contain compiled Java classes.  
EJB-JARs always have classes in them.  Maintaining uniqueness among class names 
across an entire application server can be managed with strict enforcement of 
naming structures among the developers.  In general, however, it is probably 
best to ensure that the Java classes contained inside an EAR or its modules 
will not interfere with other classes in other applications and modules that 
have the same names.  

For example, it is possible for two different applications to have classes with 
the same name.  In one application, there may be a Java class named 
"com.spoonware.training.CustomerBean".  In another application that also deals 
with products, there could be another Java class with the same name.  If these 
classes are not scoped at the EAR level, they are automatically scoped at the 
server level.  As a result, these two applications will interfere with each 
other.  It is common for this situation to exist when multiple versions of the 
same application are deployed on a test or development server. 

To prevent this interference, the "loader-repository" descriptor must be added 
to the jboss.xml for each application.  For example, assume that the 
applications are found in two EARs:  customerApp1.ear and customerApp2.ear.  
Both applications have ejb-jars which contain numerous Java classes with names 
in common between the two EARs.  To ensure that each set of classes do not 
interfere with each other, the server-specific deployment descriptors should 
have the following entries respectively:

In customerApp1.ear:  

  | <jboss-app> 
  |   <loader-repository>
  |     customers1.spoonware.com:loader=customerApp1.ear
  |   </loader-repository> 
  | </jboss-app>
  | 
In customerApp2.ear:  

  | <jboss-app> 
  |   <loader-repository>
  |     customers2.spoonware.com:loader=customerApp2.ear
  |   </loader-repository> 
  | </jboss-app>
  | 
The value of this parameter has two parts separated by a colon.  To the left of 
the colon, the value does not matter as long as it is unique on the application 
server and is a valid JMX ObjectName.  The part to the right of the colon must 
be in the format "loader=earfilename" where "earfilename" is the name of the 
current EAR.

I don't for sure if this approach will solve your conflicts problem but I've 
done it this way in the lab in the past and it solved mine.

Give it a try and let us know what you get.

Spoon

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3873238#3873238

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3873238


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to