Fabric3 JPA/Hibernate Extension

org.fabric3.jpa.runtime.emf
Class CachingEntityManagerFactoryResolver

java.lang.Object
  extended by org.fabric3.jpa.runtime.emf.CachingEntityManagerFactoryResolver
All Implemented Interfaces:
EntityManagerFactoryResolver

public class CachingEntityManagerFactoryResolver
extends Object
implements EntityManagerFactoryResolver

An EntityManagerFactoryResolver implementation that caches EntityManagerFactory instances.

Version:
$Rev: 11107 $ $Date: 2012-06-30 22:18:51 +0000 (Sat, 30 Jun 2012) $

Constructor Summary
CachingEntityManagerFactoryResolver(PersistenceContextParser parser, EntityManagerFactoryCache cache, org.fabric3.spi.monitor.MonitorService monitorService)
           
 
Method Summary
 void init()
           
 javax.persistence.EntityManagerFactory resolve(String unitName, PersistenceOverrides overrides, ClassLoader classLoader)
          Resolves the EntityManagerFactory corresponding to the given persistence unit.
 void setMonitorLevel(String logLevel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingEntityManagerFactoryResolver

public CachingEntityManagerFactoryResolver(PersistenceContextParser parser,
                                           EntityManagerFactoryCache cache,
                                           org.fabric3.spi.monitor.MonitorService monitorService)
Method Detail

setMonitorLevel

public void setMonitorLevel(String logLevel)

init

public void init()

resolve

public javax.persistence.EntityManagerFactory resolve(String unitName,
                                                      PersistenceOverrides overrides,
                                                      ClassLoader classLoader)
                                               throws JpaResolutionException
Description copied from interface: EntityManagerFactoryResolver
Resolves the EntityManagerFactory corresponding to the given persistence unit.

Specified by:
resolve in interface EntityManagerFactoryResolver
Parameters:
unitName - persistence unit name.
overrides - persistence unit property overrides
classLoader - the classloader to load the persistence XML
Returns:
Entity manager factory.
Throws:
JpaResolutionException - if an error occurs building the EMF

Fabric3 JPA/Hibernate Extension

Copyright © 2007-2012 Metaform Systems.