Skip to main content

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

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2011-08-02


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