users@glassfish.java.net

Call EntityManager in a JavaSE Environment (over JDNI)

From: <glassfish_at_javadesktop.org>
Date: Sun, 30 Sep 2007 10:33:02 PDT

Hi,

I'm trying to call a entity manager in an standalone-swing client through a jndi-lookup, but it doesn't seem to work...

so far I've tried:

javax.persistence.EntityManager em = (javax.persistence.EntityManager) ctx.lookup("java:comp/env/persistence/my-ejbPU");

javax.persistence.EntityManager em = (javax.persistence.EntityManager) ctx.lookup("java:comp/env/my-ejbPU");

javax.persistence.EntityManager em = (javax.persistence.EntityManager) ctx.lookup("my-ejbPU");

but allways got a NameNotFoundException... :\
[Message sent by forum member 'vajav' (vajav)]

http://forums.java.net/jive/thread.jspa?messageID=237744