Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Examples/JPA/NativeMetadata

< EclipseLink‎ | Examples‎ | JPA
Revision as of 10:36, 15 October 2007 by Unnamed Poltroon (Talk) (New page: You may use the org.eclipse.persistence.jpa.JpaHelper class to obtain an EntityManager. == Using a server session == <code><pre> EntityManagerFactory emf = org.eclipse.persistence.jpa.Jpa...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

You may use the org.eclipse.persistence.jpa.JpaHelper class to obtain an EntityManager.

Using a server session

EntityManagerFactory emf = org.eclipse.persistence.jpa.JpaHelper.createEntityManagerFactory(serverSession);
EntityManager em = emf.createEntityManager();

Using a sessions.xml file

EntityManagerFactory emf = org.eclipse.persistence.jpa.JpaHelper.createEntityManagerFactory(sessionName);
EntityManager em = emf.createEntityManager();

Back to the top