0 Replies Latest reply on Apr 14, 2010 1:02 PM by Nick Dodd

    Stateful beans from 2 Jars - 1 persistence unit

    Nick Dodd Newbie

      I have a persistence unit named FOO inside a jar file as follows:



      <persistence-unit name="FOO">
                <property name="hibernate.hbm2ddl.auto" value="update"/>


      This jar contains several Entity Beans and Session Beans that use this persistence unit ok.


      As you can see I also have a second jar referenced in the persistence unit, it is another jar (not within an ear) that contains 1 more Entity bean and also 1 Session Bean.


      When I start the server all tables are successfully created including the entity defined in the secondary jar.


      However - the Session Bean in the secondary jar is causing problems.


      public class SecondaryFacade implements SecondaryFacadeLocal, SecondaryFacadeRemote {
          protected EntityManager em;


      ObjectName: persistence.units:unitName=FOO


        Depends On Me:

          jboss.j2ee:service=EJB3,jar=secondary.jar,name= SecondaryFacade


      This issue may be related but not sure:




      Am running JBoss 4.3.0. What I am doing might not even be possible or legal but if so then why does it deploy the Entity Bean successfully but not the Session Bean?


      Many thanks