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 Bondzhev Newbie

      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.


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

          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:

          Hope this will help,

          An Phong Do