Jump to: navigation, search

EclipseLink/Examples/JPA/OutsideContainer

Users may also use the EntityManager API outside the container.

Using a persistence unit name

EntityManagerFactory emf = Persistence.createEntityManagerFactory(persistenceUnitName, propertiesMap);
EntityManager em = emf.createEntityManager();