persistence@glassfish.java.net

Entity manager in web applications

From: Uwe Gerger <Uwe.Gerger_at_gmx.de>
Date: Sat, 02 Sep 2006 10:19:45 +0200

Hi,
I'm confused about using an entity manager in a web application. I would like to use container managed persitence. Now my questions:

1) can I inject an entity manager factory in a multithreaded servlet?

2) can I use only one and the same entity manager in the context of one transaction or is it possible to use different entity managers within one transaction by injecting the entity manager factory in the different objects?

Thanks in advanced
Uwe
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer