This content has been marked as final.
Show 1 reply
-
1. Re: 5.1 - @PersistenceUnit fails to resolve in Servlet when
jaikiran Sep 21, 2009 3:53 AM (in response to genman)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?).