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 EntityManagerManager
persistenceUnitName
- the name of a persistence unit as defined in persistence.xml
public Map<String,EntityManager> getEntityManagers()
getEntityManagers
in interface EntityManagerManager
public void threadDidCleanup()
ThreadCleanupListener
PerthreadManager
service when a thread performs and
end-of-request cleanup.threadDidCleanup
in interface ThreadCleanupListener
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.