Package org.apache.openjpa.abstractstore
Class AbstractStoreBrokerFactory
java.lang.Object
org.apache.openjpa.kernel.AbstractBrokerFactory
org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory
- All Implemented Interfaces:
Serializable,BrokerFactory,Closeable
BrokerFactory implementation for use with the
AbstractStoreManager. This provides integration into the
Bootstrap.getBrokerFactory() bootstrapping mechanism, to facilitate
the process of creating a subclass of AbstractStoreManager. New
store manager implementations need not extend this class. Instead, set the
openjpa.BrokerFactory configuration property to
abstractstore,
and set the openjpa.abstractstore.AbstractStoreManager
configuration property to the full class name of your implementation.
Additionally, you can optionally create your own
BrokerFactory implementation. However, we recommend that you
use the AbstractStoreBrokerFactory, as it deals with pooling
and bootstrapping from a Map object (the strategy used by
Bootstrap to create a factory in a vendor-neutral manner).- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractStoreBrokerFactory(OpenJPAConfiguration conf, String storeCls, String storeProps, String platform) Construct the factory with the given settings. -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractStoreBrokerFactoryFactory method for obtaining a possibly-pooledBrokerFactoryfrom properties.Subclasses should override this method to add aPlatformproperty listing the runtime platform, such as:OpenJPA JDBC Edition: Oracle Databasestatic AbstractStoreBrokerFactoryFactory method for constructing aBrokerFactoryfrom properties.protected StoreManagerReturn a new StoreManager for this runtime.Methods inherited from class org.apache.openjpa.kernel.AbstractBrokerFactory
addLifecycleListener, addListeners, addTransactionListener, assertOpen, close, configureBroker, createDelegatingStoreManager, findBroker, findTransactionalBroker, getConfiguration, getFactoryInitializationBanner, getOpenBrokers, getPooledFactoryForKey, getPoolKey, getSupportedProperties, getUserObject, isClosed, loadPersistentTypes, lock, makeReadOnly, newBroker, newBroker, newBroker, newBroker, newBroker, newBroker, newBrokerImpl, pool, postCreationCallback, putUserObject, readResolve, releaseBroker, removeLifecycleListener, removeTransactionListener, setup, toPoolKey, unlock
-
Constructor Details
-
AbstractStoreBrokerFactory
protected AbstractStoreBrokerFactory(OpenJPAConfiguration conf, String storeCls, String storeProps, String platform) Construct the factory with the given settings.
-
-
Method Details
-
getInstance
Factory method for obtaining a possibly-pooledBrokerFactoryfrom properties. Invoked fromBootstrap.getBrokerFactory(). -
newInstance
Factory method for constructing aBrokerFactoryfrom properties. Invoked fromBootstrap.newBrokerFactory(). -
getProperties
Description copied from class:AbstractBrokerFactorySubclasses should override this method to add aPlatformproperty listing the runtime platform, such as:OpenJPA JDBC Edition: Oracle Database- Specified by:
getPropertiesin interfaceBrokerFactory- Overrides:
getPropertiesin classAbstractBrokerFactory
-
newStoreManager
Description copied from class:AbstractBrokerFactoryReturn a new StoreManager for this runtime. Note that the instance returned here may be wrapped before being passed to theAbstractBrokerFactory.newBroker()method.- Specified by:
newStoreManagerin classAbstractBrokerFactory
-