I discovered that it is possible to get an entitityManager or 
entityManagerFactory over the JNDI. This way it is possible to get entities 
from a seperate ejb package (not embeded in the EAR file of the Seam 
application (or in my case the multiple portlets)). 

In my class where I want to get the enitityManager I have multiple options to 
retrieve one:

1. Use a JNDI lookup to get the entitityManager or the factory
2. Use the @Resource annotation
3. Use the Seam-managed persistence context (but that only works for a 
conversation long entityManager)

I can't use the normal @PersistenceContext annotation because I get exceptions 
when I redeploy the ejb package that contains the entities.

My problem is that I don't know how to get an Extented EntityManager without 
using the @PersistenceContext annotiation.

You, Gavin, told me in a different topic that it isn't possible to have 
entities in a seperate ejb. But so far I succeeded pretty well. But because I 
also know that you are probably right, I would like to know for what 
implications I am heading for (next to the fact that I can't retrieve an 
Extended manager). Thx.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971391#3971391

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971391
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to