[jboss-user] [EJB 3.0 Development] - Stateful beans from 2 Jars - 1 persistence unit

Nick Dodd do-not-reply at jboss.com
Wed Apr 14 13:03:12 EDT 2010

Nick Dodd [http://community.jboss.org/people/baronDodd] created the discussion

"Stateful beans from 2 Jars - 1 persistence unit"

To view the discussion, visit: http://community.jboss.org/message/537473#537473

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:

 http://community.jboss.org/message/344723#344723 http://community.jboss.org/message/344723#344723

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


Reply to this message by going to Community

Start a new discussion in EJB 3.0 Development at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100414/1c0cf824/attachment.html 

More information about the jboss-user mailing list