org.fabric3.jpa.runtime.emf
Class DefaultEntityManagerFactoryCache
java.lang.Object
org.fabric3.jpa.runtime.emf.DefaultEntityManagerFactoryCache
- All Implemented Interfaces:
- EntityManagerFactoryCache, org.fabric3.spi.builder.classloader.ClassLoaderListener
public class DefaultEntityManagerFactoryCache
- extends Object
- implements EntityManagerFactoryCache, org.fabric3.spi.builder.classloader.ClassLoaderListener
Creates and caches entity manager factories.
- Version:
- $Rev: 8837 $ $Date: 2010-04-08 14:05:46 +0200 (Thu, 08 Apr 2010) $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultEntityManagerFactoryCache
public DefaultEntityManagerFactoryCache(CacheMonitor monitor)
setManagementService
public void setManagementService(org.fabric3.spi.management.ManagementService managementService)
destroy
public void destroy()
onDeploy
public void onDeploy(ClassLoader loader)
- Specified by:
onDeploy in interface org.fabric3.spi.builder.classloader.ClassLoaderListener
onUndeploy
public void onUndeploy(ClassLoader classLoader)
- Specified by:
onUndeploy in interface org.fabric3.spi.builder.classloader.ClassLoaderListener
get
public javax.persistence.EntityManagerFactory get(String unitName)
- Description copied from interface:
EntityManagerFactoryCache
- Returns the EntityManagerFactory for the given persistence unit name
- Specified by:
get in interface EntityManagerFactoryCache
- Parameters:
unitName - the persistence unit name
- Returns:
- the EntityManagerFactory or null if one has not been created
put
public void put(URI uri,
String unitName,
javax.persistence.EntityManagerFactory factory)
throws JpaResolutionException
- Description copied from interface:
EntityManagerFactoryCache
- Caches an EntityManagerFactory.
- Specified by:
put in interface EntityManagerFactoryCache
- Parameters:
uri - the URI of the contribution the persistence unit is defined inunitName - the persistence unit namefactory - the EntityManagerFactory to cache
- Throws:
JpaResolutionException - if there is an error caching the EntityManagerFactory
Copyright © 2007-2012 Metaform Systems.