I'm writing an app that is mainly a Seam application, but there's one operation 
where I want a plain old Servlet.  I could use plain old JDBC within the 
Servlet, but I don't want to.  Instead I want to get a proper EntityManager.

I understand that I can't use injection in a Servlet because there aren't (yet) 
lifecycle hooks to make annotations do their injection.  Also I can't get just 
one EntityManager for the Servlet because EntityManagers are not thread-safe.  
So I need to use an InitialContext to get an EntityManager factory and use that.

But I can't figure out what is the JNDI name of the EntityManagerFactory!  It 
all works fine in my Seam application, where I'm using a Seam-managed 
persistence context.  What name do I use for the EntityManagerFactory in this 
case?

Thanks


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

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

Reply via email to