Skip to main content

EAR, persistence.xml, JNDI lookup of persistence unit (EMF)

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
chris.joelly
Offline
Joined: 2011-08-02

Hello,

i have an EAR with an JAR with persistence.xml and entity classes in /lib, additionally a WAR with EJBs and they use the entities without problems.
Unfortunately i need to hand over an EntityManagerFactory to a library and i want to lookup the persistence unit via JNDI.

How can i do this?

Thanks, Chris