|
||||||||||
| 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 java.lang.String |
ARIES_JPA_CONTAINER_PROPERTIES
The name of the config properties file that can be used to configure the Aries JPA Container |
static java.lang.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 | |
|---|---|
java.util.Collection<? extends ManagedPersistenceUnitInfo> |
createManagedPersistenceUnitMetadata(org.osgi.framework.BundleContext containerContext,
org.osgi.framework.Bundle persistenceBundle,
org.osgi.framework.ServiceReference providerReference,
java.util.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(org.osgi.framework.BundleContext containerContext,
org.osgi.framework.Bundle persistenceBundle)
This method will be called when the persistence bundle is no longer being managed. |
java.lang.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 java.lang.String DEFAULT_PU_INFO_FACTORY_KEY
ManagedPersistenceUnitInfoFactory to the Aries JPA Container
static final java.lang.String ARIES_JPA_CONTAINER_PROPERTIES
| Method Detail |
|---|
java.util.Collection<? extends ManagedPersistenceUnitInfo> createManagedPersistenceUnitMetadata(org.osgi.framework.BundleContext containerContext,
org.osgi.framework.Bundle persistenceBundle,
org.osgi.framework.ServiceReference providerReference,
java.util.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 instancesjava.lang.String 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(org.osgi.framework.BundleContext containerContext,
org.osgi.framework.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 | |||||||||