org.fabric3.jpa.runtime.proxy
Class EntityManagerServiceImpl
java.lang.Object
org.fabric3.jpa.runtime.proxy.EntityManagerServiceImpl
- All Implemented Interfaces:
- EntityManagerService
public class EntityManagerServiceImpl
- extends Object
- implements EntityManagerService
Manages a cache of EntityManagers.
EntityManager instances (and their underlying Hibernate Sessions) are cached for the duration of the associated JTA transaction and closed when the
transaction commits or rolls back.
- Version:
- $Rev: 11083 $ $Date: 2012-06-21 10:38:50 +0000 (Thu, 21 Jun 2012) $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityManagerServiceImpl
public EntityManagerServiceImpl(EntityManagerFactoryCache emfCache)
getEntityManager
public javax.persistence.EntityManager getEntityManager(String unitName,
HibernateProxy proxy,
Transaction transaction)
throws EntityManagerCreationException
- Description copied from interface:
EntityManagerService
- Returns the EntityManager associated with the given transaction.
- Specified by:
getEntityManager in interface EntityManagerService
- Parameters:
unitName - the persistence unit nameproxy - the proxy requesting the EntityManagertransaction - the transaction
- Returns:
- the EntityManager
- Throws:
EntityManagerCreationException - if an error creating the EntityManager is encountered
Copyright © 2007-2012 Metaform Systems.