public class EntityManagerManagerImpl extends Object implements EntityManagerManager, ThreadCleanupListener
| Constructor and Description |
|---|
EntityManagerManagerImpl(EntityManagerSource entityManagerSource,
org.slf4j.Logger logger) |
| 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 EntityManagers for this request, creating them as necessary.
|
void |
threadDidCleanup()
Invoked by
PerthreadManager service when a thread performs and
end-of-request cleanup. |
public EntityManagerManagerImpl(EntityManagerSource entityManagerSource, org.slf4j.Logger logger)
public EntityManager getEntityManager(String persistenceUnitName)
getEntityManager in interface EntityManagerManagerpersistenceUnitName - the name of a persistence unit as defined in persistence.xmlpublic Map<String,EntityManager> getEntityManagers()
getEntityManagers in interface EntityManagerManagerpublic void threadDidCleanup()
ThreadCleanupListenerPerthreadManager service when a thread performs and
end-of-request cleanup.threadDidCleanup in interface ThreadCleanupListener5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.