This content has been marked as final.
Show 3 replies
-
1. Re: EntityManagerFactory problem
mwoelke Mar 3, 2006 8:49 AM (in response to roberto72)Why dont u use:
@PersistenceContext(unitName="TestPersistenceManager")
EntityManager m_oEM;
to get a reference to your EntityManager? This enables Dependency Injection for the EntityManager.
Regards, Milan Wölke -
2. Re: EntityManagerFactory problem
roberto72 Mar 3, 2006 9:46 AM (in response to roberto72)I obtain a NullPointerExcep when I trying to use m_oEM.
But, on the log, I noticed that:
2006-03-03 15:34:51,934 INFO [org.jboss.ejb3.JmxKernelAbstraction] installing M
Bean: jboss.j2ee:service=EJB3,ear=test.ear,jar=test-ear.jar,name=AlfaSessionBean
with dependencies:
2006-03-03 15:34:51,934 INFO [org.jboss.ejb3.JmxKernelAbstraction] persiste
nce.units:unitName=TestPersistenceManager
TIA
Roberto Colmegna -
3. Re: EntityManagerFactory problem
roberto72 Mar 3, 2006 9:51 AM (in response to roberto72)Solved: wrong position of persistence.xml, I put it into:
[test.ear]\META-INF\
but it must go into:
[test.ear]\[test-ejb.jar]\META-INF\
TIA