public class DefaultEntityManagerFactoryCache extends java.lang.Object implements EntityManagerFactoryCache, org.fabric3.spi.container.builder.classloader.ClassLoaderListener
| Constructor and Description |
|---|
DefaultEntityManagerFactoryCache(CacheMonitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
javax.persistence.EntityManagerFactory |
get(java.lang.String unitName)
Returns the EntityManagerFactory for the given persistence unit name
|
void |
onDeploy(java.lang.ClassLoader loader) |
void |
onUndeploy(java.lang.ClassLoader classLoader) |
void |
put(java.net.URI uri,
java.lang.String unitName,
javax.persistence.EntityManagerFactory factory)
Caches an EntityManagerFactory.
|
void |
setManagementService(org.fabric3.spi.management.ManagementService managementService) |
public DefaultEntityManagerFactoryCache(CacheMonitor monitor)
public void setManagementService(org.fabric3.spi.management.ManagementService managementService)
public void destroy()
public void onDeploy(java.lang.ClassLoader loader)
onDeploy in interface org.fabric3.spi.container.builder.classloader.ClassLoaderListenerpublic void onUndeploy(java.lang.ClassLoader classLoader)
onUndeploy in interface org.fabric3.spi.container.builder.classloader.ClassLoaderListenerpublic javax.persistence.EntityManagerFactory get(java.lang.String unitName)
EntityManagerFactoryCacheget in interface EntityManagerFactoryCacheunitName - the persistence unit namepublic void put(java.net.URI uri,
java.lang.String unitName,
javax.persistence.EntityManagerFactory factory)
throws JpaResolutionException
EntityManagerFactoryCacheput in interface EntityManagerFactoryCacheuri - the URI of the contribution the persistence unit is defined inunitName - the persistence unit namefactory - the EntityManagerFactory to cacheJpaResolutionException - if there is an error caching the EntityManagerFactory