public interface EntityManagerManager
EntityManager
s for the current thread.
An EntityManager
is created as needed and closed at the end of each request.
The implementation of this service is per-thread.Modifier and Type | Method and Description |
---|---|
EntityManager |
getEntityManager(String persistenceUnitName)
Gets the active
EntityManager for this request, creating it as necessary. |
Map<String,EntityManager> |
getEntityManagers()
Gets all active
EntityManager s for this request, creating them as necessary. |
EntityManager getEntityManager(String persistenceUnitName)
EntityManager
for this request, creating it as necessary.persistenceUnitName
- the name of a persistence unit as defined in persistence.xml
Map<String,EntityManager> getEntityManagers()
EntityManager
s for this request, creating them as necessary.${project.version} - Copyright © 2003-2014 The Apache Software Foundation.