Package org.apache.openjpa.abstractstore
Class AbstractStoreBrokerFactory
- java.lang.Object
-
- org.apache.openjpa.kernel.AbstractBrokerFactory
-
- org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory
-
- All Implemented Interfaces:
java.io.Serializable,BrokerFactory,Closeable
public class AbstractStoreBrokerFactory extends AbstractBrokerFactory
BrokerFactoryimplementation for use with theAbstractStoreManager. This provides integration into theBootstrap.getBrokerFactory()bootstrapping mechanism, to facilitate the process of creating a subclass ofAbstractStoreManager. New store manager implementations need not extend this class. Instead, set theopenjpa.BrokerFactoryconfiguration property toabstractstore, and set theopenjpa.abstractstore.AbstractStoreManagerconfiguration property to the full class name of your implementation. Additionally, you can optionally create your ownBrokerFactoryimplementation. However, we recommend that you use theAbstractStoreBrokerFactory, as it deals with pooling and bootstrapping from aMapobject (the strategy used byBootstrapto create a factory in a vendor-neutral manner).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractStoreBrokerFactory(OpenJPAConfiguration conf, java.lang.String storeCls, java.lang.String storeProps, java.lang.String platform)Construct the factory with the given settings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AbstractStoreBrokerFactorygetInstance(ConfigurationProvider cp)Factory method for obtaining a possibly-pooledBrokerFactoryfrom properties.java.util.Map<java.lang.String,java.lang.Object>getProperties()Subclasses should override this method to add aPlatformproperty listing the runtime platform, such as:OpenJPA JDBC Edition: Oracle Databasestatic AbstractStoreBrokerFactorynewInstance(ConfigurationProvider cp)Factory method for constructing aBrokerFactoryfrom properties.protected StoreManagernewStoreManager()Return 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 Detail
-
AbstractStoreBrokerFactory
protected AbstractStoreBrokerFactory(OpenJPAConfiguration conf, java.lang.String storeCls, java.lang.String storeProps, java.lang.String platform)
Construct the factory with the given settings.
-
-
Method Detail
-
getInstance
public static AbstractStoreBrokerFactory getInstance(ConfigurationProvider cp)
Factory method for obtaining a possibly-pooledBrokerFactoryfrom properties. Invoked fromBootstrap.getBrokerFactory().
-
newInstance
public static AbstractStoreBrokerFactory newInstance(ConfigurationProvider cp)
Factory method for constructing aBrokerFactoryfrom properties. Invoked fromBootstrap.newBrokerFactory().
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> 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
protected StoreManager 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
-
-