0 Replies Latest reply on Sep 27, 2009 4:25 AM by Juan Isern

    Current EntityManager

    Juan Isern Newbie

      Hi guys,

      I was wondering if there is any way to look up via JNDI or any other mechanism the current entity manager, exactly like the annotation @PersistentContext does.

      Since my objects that depend on the EntityManager are not managed, I don't see any other option but pulling them from JNDI.

      I read somewhere that you can declare inside ejb-jar.xml a "persistence-context-ref-name" element to bind a JNDI name to the current EM. The problem is that such configuration must be made on an single EJB basis.

      I'll be very grateful for your answers!