3 Replies Latest reply on Apr 15, 2015 2:10 AM by lylewang

    How to upgrade one ejb inside an ear

    superalex

      hi,

      i have an ear with many ejbs inside it. These should never be stopped because client applications can't stop working. If I have to upgrade only on ejb (maybe adding some remote method), it is possibile to upgrade that ejb without stopping the others in the ear??

       

      I use eap 6.1

       

      thanks

        • 1. Re: How to upgrade one ejb inside an ear
          lylewang

          >> These should never be stopped because client applications can't stop working.

          Then you should really have an HA / Cluster setup for your server environment.

           

          It is not recommended to do hot deployment in production env.

          If you want to upgrade an application, it's best if you could stop/disable the ear deployment, undeploy, deploy the new one and then enable it. By doing this, all the sub-deployments (ejbs) are stopped.

          If you have a clustered env. then you could do it in staged manner, so while you upgrading your app to newer version on one server, clients can still connect to the old version of app. on the other cluster members.

           

          Regards,

          Lyle.

          • 2. Re: How to upgrade one ejb inside an ear
            superalex

            ok, I made the question because i'm upgrading the application from jboss 4..and in this version i can update the ejb without problem..i 'm thinking also to deploy all the ejbs singly, but it becomes awkward to manage the libs and the interconnections between ejbs.

            other thing: some ejbs are socket modules witch connect to other application...so there must be only one connection. if i understood well, cluster will duplicate the environment,so will not work in this case.

            other solution i'm thinking about is to deploy the most updated ejb (the others are rarely touched) out of the ear. But some ejbs inside the ear need to use it...

            • 3. Re: How to upgrade one ejb inside an ear
              lylewang

              >> some ejbs are socket modules witch connect to other application...so there must be only one connection. if i understood well, cluster will duplicate the environment,so will not work in this case.

              I'm not sure what you mean by "socket modules" but it sounds like you want only one EJB instance running and having single connection to some external services ? In that case I guess you can try cluster HA singleton which gives you only one instance exactly cluster wide. Not sure if this sounds what you want or works for your scenario, but pretty sure you'd need to write some code and have some sound testings...

              check the quickstart here:

              cluster-ha-singleton: A SingletonService deployed in a JAR started by SingletonStartup and accessed by an EJB

               

               

              >> other solution i'm thinking about is to deploy the most updated ejb (the others are rarely touched) out of the ear. But some ejbs inside the ear need to use it...

              This sounds like a reasonable approach, you may want to re-organize your app. a bit.

              You should be able to setup dependency between different deployments though, however, all the dependant EJBs stop working when you upgrading this "most updated" one, which doesn't help to resolve your original requirement "These should never be stopped ".

               

               

              Lyle.