|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.aries.jpa.container.impl.EntityManagerFactoryManager
public class EntityManagerFactoryManager
This class manages the lifecycle of Persistence Units and their associated
EntityManagerFactory
objects.
Constructor Summary | |
---|---|
EntityManagerFactoryManager(org.osgi.framework.BundleContext containerCtx,
org.osgi.framework.Bundle b,
Collection<ParsedPersistenceUnit> parsedUnits,
org.osgi.framework.ServiceReference ref,
Collection<ManagedPersistenceUnitInfo> infos)
Create an EntityManagerFactoryManager for
the supplied persistence bundle. |
Method Summary | |
---|---|
void |
bundleStateChange()
Notify the EntityManagerFactoryManager that the bundle it is
managing has changed state
This method should only be called when not holding any locks |
void |
destroy()
Stop managing any EntityManagerFactory s
This method should only be called when not holding any locks |
org.osgi.framework.Bundle |
getBundle()
|
Collection<ParsedPersistenceUnit> |
getParsedPersistenceUnits()
|
void |
manage(Collection<ParsedPersistenceUnit> parsedUnits,
org.osgi.framework.ServiceReference ref,
Collection<ManagedPersistenceUnitInfo> infos)
Manage the EntityManagerFactories for the following provider, updated persistence xmls and PersistenceUnitInfo s
This method should only be called when not holding any locks |
void |
manage(org.osgi.framework.ServiceReference ref,
Collection<ManagedPersistenceUnitInfo> infos)
Manage the EntityManagerFactories for the following provider and PersistenceUnitInfo s
This method should only be called when not holding any locks |
boolean |
providerRemoved(org.osgi.framework.ServiceReference ref)
Notify the EntityManagerFactoryManager that a provider is being
removed from the service registry. |
void |
quiesce(DestroyCallback countdown)
Quiesce this Manager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityManagerFactoryManager(org.osgi.framework.BundleContext containerCtx, org.osgi.framework.Bundle b, Collection<ParsedPersistenceUnit> parsedUnits, org.osgi.framework.ServiceReference ref, Collection<ManagedPersistenceUnitInfo> infos)
EntityManagerFactoryManager
for
the supplied persistence bundle.
This constructor should only be used by a
PersistenceBundleManager
that is synchronized
on itself, and the resulting manager should be immediately
stored in the bundleToManager Map
b
- infos
- ref
- parsedUnits
- Method Detail |
---|
public boolean providerRemoved(org.osgi.framework.ServiceReference ref)
EntityManagerFactoryManager
that a provider is being
removed from the service registry.
If the provider is used by this EntityManagerFactoryManager
then
the manager should destroy the dependent persistence units.
This method should only be called when not holding any locks
ref
- The provider service reference
public void bundleStateChange() throws InvalidPersistenceUnitException
EntityManagerFactoryManager
that the bundle it is
managing has changed state
This method should only be called when not holding any locks
InvalidPersistenceUnitException
- if the manager is no longer valid and
should be destroyedpublic void manage(org.osgi.framework.ServiceReference ref, Collection<ManagedPersistenceUnitInfo> infos) throws IllegalStateException
PersistenceUnitInfo
s
This method should only be called when not holding any locks
ref
- The PersistenceProvider
ServiceReference
infos
- The PersistenceUnitInfo
s defined by our bundle
IllegalStateException
public void manage(Collection<ParsedPersistenceUnit> parsedUnits, org.osgi.framework.ServiceReference ref, Collection<ManagedPersistenceUnitInfo> infos) throws IllegalStateException
PersistenceUnitInfo
s
This method should only be called when not holding any locks
parsedUnits
- The updated ParsedPersistenceUnit
s for this bundleref
- The PersistenceProvider
ServiceReference
infos
- The PersistenceUnitInfo
s defined by our bundle
IllegalStateException
public void destroy()
EntityManagerFactory
s
This method should only be called when not holding any locks
public org.osgi.framework.Bundle getBundle()
public Collection<ParsedPersistenceUnit> getParsedPersistenceUnits()
public void quiesce(DestroyCallback countdown)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |