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