Hello,
After reading some documentation, I though I had my injection code worked
out, but apparently not.
I am using Tomcat with OpenJPA.
In my class, I have:
@PersistenceUnit(unitName = "CallScheduler")
private @Resource(name="bean/OpenJPAEMF")OpenJPAEntityManagerFactory
emf;
In my META-INF/context.xml, I have:
<Resource name="bean/OpenJPAEMF" auth="Container"
factory="org.apache.openjpa.persistence.OpenJPAEntityManagerFactory"
type="org.apache.openjpa.persistence.OpenJPAEntityManagerFactory.class"
/>
While executing a method in my class, emf is still null.
How should I instantiate emf? I am under the impression that
OpenJPAPersistence.createEntityManagerFactory is for unmanaged code...
Eric
--
View this message in context:
http://n2.nabble.com/Tomcat-Injection-tp395699p395699.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.