That's good to know.
I think the basis of my problem is Tomcat 6 on it's own doesn't support
this?
Eric
--
View this message in context:
http://www.nabble.com/%40PersistenceContext-injection-works-on-other-app-server%2C-not-Tomcat...-tp18350591p18360896.html
Sent from the Tomcat - User maili
I have the following declaration in my class:
@PersistenceContext(unitName = "CallScheduler")
EntityManagerFactory emf;
If I compile the code in NetBeans/Glassfish, emf is instantiated.
If I compile the code in Eclipse/Tomcat, emf is *not* instantiated - no
errors, other than a NullPointerExcep
It looks like java:comp/env/OpenJPAEMF should have worked, although the extra
slash didn't work either.
>From reading some articles, it looks like the following should work:
I'm no longer using the initial context, or web.xml.
context.xml:
my class using JPA:
@PersistenceUnit(
How true,
I was creating a JDBC JNDI for an example, and didn't have it configured
properly. That misled me.
Thanks!
I now have in my META-INF/context.xml file:
Now, this code:
Context initCtx = new InitialContext();
emf = (OpenJPAEntityManagerFactory)
initCtx.lookup("java:c
Hello,
I have OpenJPA working on Tomcat 6 using
Persistence.createEntityManagerFactory, which is unmanaged.
Now I'd like to use the managed environment, but I am having a problem with
the JNDI resource.
I am not deploying a WAR, but individual files, so I can't use
META-INF/context.xml (I'm led