1 Reply Latest reply on Jan 29, 2009 9:01 AM by apdo

    How to put EJB 2.1 Entity + EJB 3 session in signle JAR

    doychin

      I have one large project that consists of few EJB 2.x modules each of them containing some Session and Entity beans.

      What I want to do is to migrate all Session beans to use EJB 3 annotations but still use the EJB2.x entity beans and moving them slowly to JPA.

      Is this possible with JBoss and if it is how I have to package these?

      If you can provide some tips or examples it will be great.

      Doychin

        • 1. Re: How to put EJB 2.1 Entity + EJB 3 session in signle JAR

          I am currently performing that migration.

          During the migration process I have EJB2.1 and EJB3 in the same application. I don't plan to put this 2 ejb types together in production. However, it should work fine.

          Migrating only session bean is very simple and work quite fine. However, you will have to put these ejb3 in a separate jar file that your EJB2.1.

          When you will migrate you entities, the only problem I see in having both type of EJB is that I don't think you can have managed relationship between EJB2.1 entity and EJB3 entity. Otherwise migrating is going well. To accelerate a little bit the migration process, I have use xslt files created by oracle.

          You can find this xslt files at the following location:
          http://www.oracle.com/technology/pub/articles/vohra_ejb.html


          Hope this will help,

          An Phong Do
          www.solabs.com