|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ManagedPersistenceUnitInfoFactory
A Factory for ManagedPersistenceUnitInfo
objects.
This interface marks a plug-point for implementations that wish to extend
the Aries JPA Container by providing customized PersistenceUnitInfo
objects.
Customized implementations can be provided in two ways:
ManagedPersistenceUnitInfoFactory
implementation
that should be used. The provided class name must be loadable by this bundle.
Implementations of this interface must have a no-args constructor and be safe for
use by multiple concurrent threads.
No locks will be held by the JPA container or framework when calling methods on this interface.
Field Summary | |
---|---|
static String |
ARIES_JPA_CONTAINER_PROPERTIES
The name of the config properties file that can be used to configure the Aries JPA Container |
static String |
DEFAULT_PU_INFO_FACTORY_KEY
The config property key that should be used to provide a customized ManagedPersistenceUnitInfoFactory to the Aries JPA Container |
Method Summary | |
---|---|
Collection<ManagedPersistenceUnitInfo> |
createManagedPersistenceUnitMetadata(BundleContext containerContext,
Bundle persistenceBundle,
ServiceReference providerReference,
Collection<ParsedPersistenceUnit> persistenceMetadata)
This method will be called by the Aries JPA container when persistence descriptors have been located in a persistence bundle. |
void |
destroyPersistenceBundle(BundleContext containerContext,
Bundle persistenceBundle)
This method will be called when the persistence bundle is no longer being managed. |
String |
getDefaultProviderClassName()
If no persistence units in a persistence bundle specify a JPA PersistenceProvider
implementation class, then the JPA container will call this method to obtain a default
provider to use. |
Field Detail |
---|
static final String DEFAULT_PU_INFO_FACTORY_KEY
ManagedPersistenceUnitInfoFactory
to the Aries JPA Container
static final String ARIES_JPA_CONTAINER_PROPERTIES
Method Detail |
---|
Collection<ManagedPersistenceUnitInfo> createManagedPersistenceUnitMetadata(BundleContext containerContext, Bundle persistenceBundle, ServiceReference providerReference, Collection<ParsedPersistenceUnit> persistenceMetadata)
containerContext
- The BundleContext
for the container bundle. This can be
used to get services from the service registry when creating
PersistenceUnitInfo
objects.persistenceBundle
- The Bundle
defining the persistence units. This bundle may
be in any state, and so may not have a usable BundleContext
or be able to load classes.providerReference
- A ServiceReference
for the PersistenceProvider
service
that will be used to create EntityManagerFactory
objects from
these persistence units.persistenceMetadata
- A Collection
of ParsedPersistenceUnit
objects containing the
metadata from the persistence descriptor.
ManagedPersistenceUnitInfo
objects that can be used to create EntityManagerFactory
instancesString getDefaultProviderClassName()
PersistenceProvider
implementation class, then the JPA container will call this method to obtain a default
provider to use.
PersistenceProvider
implementation class name, or null if no default is
specified.void destroyPersistenceBundle(BundleContext containerContext, Bundle persistenceBundle)
PersistenceProvider
being
used is no longer available.
When this method is called implementations should clear up any resources associated with
persistence units defined by the persistence bundle.
containerContext
- The BundleContext
for the container bundle.persistenceBundle
- The persistence bundle that is no longer valid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |