| Author |
JPA - inject of EntityManager is always null
|
zshal shlev
Greenhorn
Joined: Jun 17, 2009
Posts: 1
|
|
hi all
serious beginner problem
i have an ejb3 in jboss 5.1
see code:
@Stateless(mappedName = "iknowbean")
public class IknowBean implements IknowBeanLocal {
@PersistenceContext (unitName="INOPro") private EntityManager emf;
in the persistence.xml i have the unitName appearing as the persistence-unit
why is emf always null
when i run it from servlet it works when i run it from this ejb it does not
any help would be great
|
 |
Leonardo Carreira
Ranch Hand
Joined: Apr 07, 2009
Posts: 482
|
|
Hai...
May i know your persistence.xml configuration?...
and where do you put that persistence.xml file?..
Thanks ...
|
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
|
 |
 |
|
|
subject: JPA - inject of EntityManager is always null
|
|
|