[jboss-user] [EJB 3.0] - EntityManager available outside container ?

gbasilico do-not-reply at jboss.com
Mon Apr 16 06:02:31 EDT 2007


Hello,
We are planning to migrate an application from EJB 2.1 to EJB3. Our application currently uses CMP entity bean and the client side is a SWT application (no servlet, no jsp). So in order to replace my old CMP i wanted to use the new persistence layer.

My problem is that i'm trying to access an EntityManager outside the EJB container  (see my other post here : http://www.jboss.com/index.html?module=bb&op=viewtopic&t=106320).
After reading some articles, i found that EntityManager may not be accessible from outside the container (after adding a "jboss.entity.manager.jndi.name" property in my persistence.xml, i'm trying to get it from a jndi lookup but it returns null).

So my question is : what is true ? Is it possible to access the entitymanager this way ? Or is it mandatory to use a session bean (with dependency injection of the EntityManager) to access it from the client side ? 

Thanks in advance.
Regards,

Guillaume Basilico

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

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



More information about the jboss-user mailing list