users@glassfish.java.net

Re: Surprising JPA (Toplink) Behaviour (glassfish v1 UR1)

From: <glassfish_at_javadesktop.org>
Date: Mon, 26 Mar 2007 23:01:14 PST

Excuse me if it my description is not clear.

The EntityManager is injected in the Stateless Session Bean as follows:

@PersistenceContext(unitName = "default")
private EntityManager em;

If a business method is executed, the em instance is manually (not by the container) set in a ThreadLocal variable, so we can use it "everywhere" we need it during the execution of our business method.

Regards,

Koen
[Message sent by forum member 'koenhautekeete' (koenhautekeete)]

http://forums.java.net/jive/thread.jspa?messageID=210012