public class DefaultEntityManagerFactoryCache extends java.lang.Object implements EntityManagerFactoryCache, org.fabric3.spi.contribution.ContributionServiceListener
| Constructor and Description |
|---|
DefaultEntityManagerFactoryCache(org.fabric3.spi.classloader.ClassLoaderRegistry classLoaderRegistry,
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 |
onInstall(org.fabric3.spi.contribution.Contribution contribution) |
void |
onProcessManifest(org.fabric3.spi.contribution.Contribution contribution) |
void |
onRemove(org.fabric3.spi.contribution.Contribution contribution) |
void |
onStore(org.fabric3.spi.contribution.Contribution contribution) |
void |
onUninstall(org.fabric3.spi.contribution.Contribution contribution) |
void |
onUpdate(org.fabric3.spi.contribution.Contribution contribution) |
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(org.fabric3.spi.classloader.ClassLoaderRegistry classLoaderRegistry,
CacheMonitor monitor)
public void setManagementService(org.fabric3.spi.management.ManagementService managementService)
public void destroy()
public void onUninstall(org.fabric3.spi.contribution.Contribution contribution)
onUninstall in interface org.fabric3.spi.contribution.ContributionServiceListenerpublic 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 org.fabric3.api.host.Fabric3Exception
EntityManagerFactoryCacheput in interface EntityManagerFactoryCacheuri - the URI of the contribution the persistence unit is defined inunitName - the persistence unit namefactory - the EntityManagerFactory to cacheorg.fabric3.api.host.Fabric3Exception - if there is an error caching the EntityManagerFactorypublic void onStore(org.fabric3.spi.contribution.Contribution contribution)
onStore in interface org.fabric3.spi.contribution.ContributionServiceListenerpublic void onProcessManifest(org.fabric3.spi.contribution.Contribution contribution)
onProcessManifest in interface org.fabric3.spi.contribution.ContributionServiceListenerpublic void onInstall(org.fabric3.spi.contribution.Contribution contribution)
onInstall in interface org.fabric3.spi.contribution.ContributionServiceListenerpublic void onUpdate(org.fabric3.spi.contribution.Contribution contribution)
onUpdate in interface org.fabric3.spi.contribution.ContributionServiceListenerpublic void onRemove(org.fabric3.spi.contribution.Contribution contribution)
onRemove in interface org.fabric3.spi.contribution.ContributionServiceListener