2 Replies Latest reply on Nov 16, 2002 3:49 AM by juha

    Multiple EAR deploy

    alistair.black

      Hi,

      I'm porting my applications from Orion to JBoss 3.0.4 and I'm having problems in deploying more than one application EAR file to the server.

      Each EAR file contains the same bean source but different deployment descriptors to enable each application to hook up to its own database. As the bean source code is the same the JNDI names for each bean are also the same. In Orion this was ok as each EAR file, and the resulting application, appeared to be encapsulated. However if I deploy more than one EAR file to Orion I receive InstanceAlreadyExistsException exceptions. E.g.

      javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=ClientValuationEntityBean,service=EJB already registered.

      I'm sure there must be a way round this. Can anyone help?

      Many thanks

      Alistair

        • 1. Re: Multiple EAR deploy
          alistair.black

          Hi,

          Having just purchased the admin manual I've found the section on "scoping classes using ears" and have created a jboss-app.xml file as specified. However this has not resolved the problem. I am presuming that this file should be included within the meta-inf direction of the ear file. Is this correct?

          Alistair

          • 2. Re: Multiple EAR deploy

            You need to make sure the entity beans from the EAR gets bound to different global names if you deploy it twice (by default both will try to use the same ejb-name if you don't override it). See the jboss.xml DTD (/docs/dtd) and how to use the <jndi-name> element.