I have the exact same question.
need more information. How are u getting access to the EntityManager? Wht is your persistence.xml file?
Well, by me it was similar. According to the EJB3 trailblazer, only persistent entity beans should be in the .par file, and session beans in the .ejb3 file. The .par file contained /WEB-INF/persistence.xml, the .ejb3 file not. I had only one entity bean in .par and one stateless session bean in .ejb3. That stateless bean was DAO for the entity bean and when placed in the .ejb3, jboss was unable the inject persistent context to my DAO session bean.
Now I placed the session bean in the .par file and it's working,but it is in conflict with the recommandation, that only entity beans should be in .par archive.
So what is right approach. In the .par file should be all classes, which need acces to persistence context (typically including DAO stateless session beans)??? Or should I place DAO beans in the .ejb3 file together with WEB-INF/persistence.xml same as in .par file??? Currently it is not clear for me, the difference between the .par and .ejb3 files...
Thanks for any clarification.
The configuration settings for the persistence context should be specified in the META-INF/persistence.xml file in the .par archive not the WEB-INF as you've stated.
The rest should work as you've stated and as laid out in the walkthrough...
Sorry for confusing. The persistent.xml was in all my experiments placed in the META-INF directory...
you do not give enough info for us to help you