org.apache.openjpa.abstractstore
Class AbstractStoreBrokerFactory

java.lang.Object
  extended by org.apache.openjpa.kernel.AbstractBrokerFactory
      extended by org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory
All Implemented Interfaces:
Serializable, BrokerFactory, Closeable

public class AbstractStoreBrokerFactory
extends AbstractBrokerFactory

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:
Serialized Form

Constructor Summary
protected AbstractStoreBrokerFactory(OpenJPAConfiguration conf, String storeCls, String storeProps, String platform)
          Construct the factory with the given settings.
 
Method Summary
static AbstractStoreBrokerFactory getInstance(ConfigurationProvider cp)
          Factory method for obtaining a possibly-pooled BrokerFactory from properties.
 Properties getProperties()
          Subclasses should override this method to add a Platform property listing the runtime platform, such as: OpenJPA JDBC Edition: Oracle Database
static AbstractStoreBrokerFactory newInstance(ConfigurationProvider cp)
          Factory method for constructing a BrokerFactory from properties.
protected  StoreManager newStoreManager()
          Return a new StoreManager for this runtime.
 
Methods inherited from class org.apache.openjpa.kernel.AbstractBrokerFactory
addLifecycleListener, addListeners, addTransactionListener, close, configureBroker, findBroker, findTransactionalBroker, getConfiguration, getFactoryInitializationBanner, getOpenBrokers, getPooledFactoryForKey, getPoolKey, getUserObject, isClosed, loadPersistentTypes, lock, makeReadOnly, newBroker, newBroker, newBroker, newBroker, newBroker, newBrokerImpl, pool, putUserObject, readResolve, releaseBroker, removeLifecycleListener, removeTransactionListener, setup, toPoolKey, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStoreBrokerFactory

protected AbstractStoreBrokerFactory(OpenJPAConfiguration conf,
                                     String storeCls,
                                     String storeProps,
                                     String platform)
Construct the factory with the given settings.

Method Detail

getInstance

public static AbstractStoreBrokerFactory getInstance(ConfigurationProvider cp)
Factory method for obtaining a possibly-pooled BrokerFactory from properties. Invoked from Bootstrap.getBrokerFactory().


newInstance

public static AbstractStoreBrokerFactory newInstance(ConfigurationProvider cp)
Factory method for constructing a BrokerFactory from properties. Invoked from Bootstrap.newBrokerFactory().


getProperties

public Properties getProperties()
Description copied from class: AbstractBrokerFactory
Subclasses should override this method to add a Platform property listing the runtime platform, such as: OpenJPA JDBC Edition: Oracle Database

Specified by:
getProperties in interface BrokerFactory
Overrides:
getProperties in class AbstractBrokerFactory

newStoreManager

protected StoreManager newStoreManager()
Description copied from class: AbstractBrokerFactory
Return a new StoreManager for this runtime. Note that the instance returned here may be wrapped before being passed to the AbstractBrokerFactory.newBroker() method.

Specified by:
newStoreManager in class AbstractBrokerFactory


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.