[jboss-user] [Persistence] - Current EntityManager

juicebox do-not-reply at jboss.com
Sun Sep 27 04:25:01 EDT 2009


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!


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

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257197



More information about the jboss-user mailing list