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