1 Reply Latest reply on Jan 18, 2013 11:49 AM by Wolf-Dieter Fink

    Co-existence of EJB 2.1 and EJB 3.x?

    Mike Miller Newbie

      The tech stack on our app is very old:


      JBoss 4.2.3

      Hibernate 2

      EJB 2.1 (all stateless session beans)


      We have done some research on moving up to AS7.  One of the problems is that our release window is tight so we are looking for ways to break some of this down rather than doing the JBoss 4.2.3 -> AS7,  H2->H3/4 and EJB 2.1-> EJB 3.x all at the same time.  Our app is a POS system that had a "Central Server" at headquarters, a "Store Server" in each retail store and then webstart clients.  


      One of the ideas might be to migrate the EJB 2.1 up to EJB 3.x while still running on JBoss 4.2.3, because I seem to remember that 4.2.3 supported EJB3.  With this type of topography, our customers can not always 'big bang' the upgrade to Central, all Stores and clients in a single night.   This means that we need to be able upgrade our Central to a newer technology and still be able to communicate with the remote stores and clients, generally thru the EJBs (read RMI).   This has worked in the past because we haven't changed the tech stack above in years!


      The problem/question is that we have cases where a POS client or Store Server may need to communicate directly with the Central Server thru the remote ejbs.   In this case, can our remote ejb 2.1 clients/stores work with a ejb 3.x Central?  


      The JBoss 4.2.3.GA --> AS7 migration we are thinking of doing in a major release due to all the additional changes required, like re-creating the server, installer and configuration changes, etc.


      Are there other issues like this we may need to solve?   Any suggestions appreciated!

        • 1. Re: Co-existence of EJB 2.1 and EJB 3.x?
          Wolf-Dieter Fink Master

          As a migration from SLSB's from EJB2=>EJB3 is simple you might do this.

          From the EJB spec a EJB3 bean have to support EJB2 Home/Remote interface, so you can keep this and call the EJB3 bean from your EJB2 application as before with EJB2 interfaces.

          If you migrate that you call the EJB3 interfaces (which is more simple without stupid Home and create code) and drop the EJB2 interface if not longer needed.


          A mix of AS4 and AS7 might be a bit more tricky as the EJB invocation was complete rewritten, so I would (if possible) do this change in one step.

          1 of 1 people found this helpful