-
1. Re: Entities in .par files and session beans in .ejb3
camross Nov 8, 2005 12:32 PM (in response to faelin)I have the exact same question.
Cameron. -
2. Re: Entities in .par files and session beans in .ejb3
bill.burke Nov 8, 2005 1:28 PM (in response to faelin)need more information. How are u getting access to the EntityManager? Wht is your persistence.xml file?
-
3. Re: Entities in .par files and session beans in .ejb3
kaja78 Nov 30, 2005 5:57 AM (in response to faelin)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. -
4. Re: Entities in .par files and session beans in .ejb3
richy_rich Nov 30, 2005 10:14 AM (in response to faelin)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... -
5. Re: Entities in .par files and session beans in .ejb3
kaja78 Nov 30, 2005 10:32 AM (in response to faelin)Sorry for confusing. The persistent.xml was in all my experiments placed in the META-INF directory...
-
6. Re: Entities in .par files and session beans in .ejb3
epbernard Dec 30, 2005 3:10 PM (in response to faelin)you do not give enough info for us to help you