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.
Difference between revisions of "EclipseLink/Examples/JPA/OutsideContainer"
< EclipseLink | Examples | JPA
(→Using a persistence unit name) |
|||
Line 1: | Line 1: | ||
− | Users may also use the EntityManager API outside the container | + | Users may also use the EntityManager API outside the container. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== Using a persistence unit name == | == Using a persistence unit name == |
Revision as of 10:35, 15 October 2007
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();