3 Replies Latest reply on Apr 7, 2009 10:35 AM by jaikiran pai

    Multiple EAR deployment not working as documented (at all !)

    Paul Smith Newbie

      I have 2 EARs that I wish to deploy in the same JBoss configuration. The EARs have identical contents except for the conf/log4j.xml file, the MySQL datasource file, and the META-INF/jboss-app.xml file. One of the files in each of the EARs is a JAR file (config.jar) containing POJOs and EJBs. config.jar is in the root level of the EARs.

      When I deploy the EARs I get the error:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.j2ee:module=config.jar,uid=31702491,service=EjbModule
      State: FAILED
      Reason: javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=ejb/CustBean,service=EJB already registered.

      This article http://www.jboss.org/community/docs/DOC-9288 and others I have found led me to make the changes:
      myear1.ear: META-INF/jboss-app.xml
      myear2.ear: META-INF/jboss-app.xml

      Section of the documentation found here http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch2.chapter.html confirms what I have done is correct.

      In default/deploy, my ear-deployer.xml has the contents:
       <mbean code="org.jboss.deployment.EARDeployer"
       <attribute name="Isolated">true</attribute>
       <attribute name="CallByValue">false</attribute>

      The EARs have identical META-INF/application.xml files with contents:

      I want only one code base, and so having different JNDI names for my beans in each copy of config.jar is not something I want to do. The articles I have read suggest that what I want to do is possible, but I am clearly missing something. Any help therefore greatly appreciated!