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.
EclipseLink/Examples/JPA/OutsideContainer
Users may also use the EntityManager API outside the container by creating a EntityManagerFactory for a given persistence unit name and properties map (includes database information etc.)
EntityManagerFactory emf = Persistence.createEntityManagerFactory(persistenceUnitName, propertiesMap);
EntityManager em = emf.createEntityManager();