[jboss-user] [EJB 3.0 Users] - Re: 5.1 - @PersistenceUnit fails to resolve in Servlet when
jaikiran
do-not-reply at jboss.com
Mon Sep 21 03:53:47 EDT 2009
As per the EJB3 Persistence spec section 6.2.2, the persistence unit if packaged in a ejb .jar is visible only within that jar (unless you use the jarname#unitname convention while injecting the persistence context). However if you package the persistence.xml in the META-INF folder of the .ear then it will be visible to all components in the ear.
Having said that i don't know why the presence/absence of EJBs in the persistence jar should show a different behaviour (probably the deployment order of the component changes when the EJBs are added?).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256084#4256084
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256084
More information about the jboss-user
mailing list