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 |
---|---|
javax.persistence.EntityManager |
getEntityManager(java.lang.String persistenceUnitName)
Gets the active EntityManager for this request, creating it as necessary.
|
java.util.Map<java.lang.String,javax.persistence.EntityManager> |
getEntityManagers()
Gets all active EntityManagers for this request, creating them as necessary.
|
javax.persistence.EntityManager getEntityManager(java.lang.String persistenceUnitName)
persistenceUnitName
- the name of a persistence unit as defined in persistence.xml
java.util.Map<java.lang.String,javax.persistence.EntityManager> getEntityManagers()
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.