org.apache.openjpa.jdbc.kernel
Class JDBCBrokerFactory

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

public class JDBCBrokerFactory
extends AbstractBrokerFactory

BrokerFactory type for use with the JDBC runtime.

Author:
Abe White, Marc Prud'hommeaux
See Also:
Serialized Form

Constructor Summary
JDBCBrokerFactory(JDBCConfiguration conf)
          Construct the factory with the given option settings; however, the factory construction methods are recommended.
 
Method Summary
static JDBCBrokerFactory getInstance(ConfigurationProvider cp)
          Factory method for obtaining a possibly-pooled factory from properties.
static JDBCBrokerFactory getInstance(JDBCConfiguration conf)
          Factory method for constructing a factory from a configuration.
 Properties getProperties()
          Subclasses should override this method to add a Platform property listing the runtime platform, such as: OpenJPA JDBC Edition: Oracle Database
protected  BrokerImpl newBrokerImpl(String user, String pass)
          Return a broker configured with the proper settings.
static JDBCBrokerFactory newInstance(ConfigurationProvider cp)
          Factory method for constructing a factory 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, getPooledFactory, getPooledFactory, getUserObject, isClosed, lock, makeReadOnly, newBroker, newBroker, newBroker, newBroker, newBroker, pool, putUserObject, readResolve, removeLifecycleListener, removeTransactionListener, setup, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCBrokerFactory

public JDBCBrokerFactory(JDBCConfiguration conf)
Construct the factory with the given option settings; however, the factory construction methods are recommended.

Method Detail

newInstance

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


getInstance

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


getInstance

public static JDBCBrokerFactory getInstance(JDBCConfiguration conf)
Factory method for constructing a factory from a configuration.


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

newBrokerImpl

protected BrokerImpl newBrokerImpl(String user,
                                   String pass)
Description copied from class: AbstractBrokerFactory
Return a broker configured with the proper settings. By default, this method constructs a new BrokerImpl of the class set for this factory.

Overrides:
newBrokerImpl in class AbstractBrokerFactory


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