3 Replies Latest reply on Feb 20, 2003 6:01 AM by juhalindfors

    deploy of different versions of the same EAR

    jova73

      Hi,
      I'd like to deploy two EARs containing two different version of the
      same EJB (of course with the same JNDI name, ...) and two different sets
      of supporting classes (same name but different versions).

      Of course I can't just copy the two file in the deployment folder because
      JBoss complains about an already registered EJB and I would get inconsistencies
      because of the loading of the two different versions of the same classes.

      Any idea??

      Thank you very much in advance!!

      Regards,
      Andrea

        • 1. Re: deploy of different versions of the same EAR

          You need to change the <jndi-name> mappings in jboss.xml to bind the different versions under different names. Also you need to declare separate classloader repositories in your jboss-app.xml file, see the <loader-repository> tag in jboss-app_3_0.dtd (any valid object name string will do).

          • 2. Re: deploy of different versions of the same EAR
            jova73

            Thank you for your reply.
            But what if I really needed to deploy two different versions of the same application (i.e. production and test version)?
            Of course I'd like to mantain the same JNDI name; should I use two different JBoss installation?

            Thanks!!
            Andrea

            • 3. Re: deploy of different versions of the same EAR

              you can't bind two versions under the same global name in one server (how would the client know which version to invoke?), also you'd probably want to configure two different datasources for your entity beans (test and production databases). Setting up two servers is the best thing to do.