Fabric3 JPA/Hibernate Extension

org.fabric3.jpa.runtime.proxy
Class EntityManagerServiceImpl

java.lang.Object
  extended by 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) $

Constructor Summary
EntityManagerServiceImpl(EntityManagerFactoryCache emfCache)
           
 
Method Summary
 javax.persistence.EntityManager getEntityManager(String unitName, HibernateProxy proxy, Transaction transaction)
          Returns the EntityManager associated with the given transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityManagerServiceImpl

public EntityManagerServiceImpl(EntityManagerFactoryCache emfCache)
Method Detail

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 name
proxy - the proxy requesting the EntityManager
transaction - the transaction
Returns:
the EntityManager
Throws:
EntityManagerCreationException - if an error creating the EntityManager is encountered

Fabric3 JPA/Hibernate Extension

Copyright © 2007-2012 Metaform Systems.