[jboss-user] [EJB 3.0] - Re: JNDI and the EntityManager

ALRubinger do-not-reply at jboss.com
Mon Sep 25 15:20:34 EDT 2006


By default, the EntityManager isn't placed in JNDI.

To do so, add the property:

<property name="jboss.entity.manager.factory.jndi.name" value="java:/yourJndiName"/>

...to persistence.xml, and inject using:

@Resource (mappedName="java:/yourJndiName")
  | EntityManager em;

S,
ALR

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

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



More information about the jboss-user mailing list