Package org.apache.openjpa.jdbc.kernel
Class JDBCBrokerFactory
- java.lang.Object
 - 
- org.apache.openjpa.kernel.AbstractBrokerFactory
 - 
- org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory
 
 
 
- 
- All Implemented Interfaces:
 Serializable,BrokerFactory,Closeable
- Direct Known Subclasses:
 DistributedJDBCBrokerFactory
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
Constructors Constructor Description JDBCBrokerFactory(JDBCConfiguration conf)Construct the factory with the given option settings; however, the factory construction methods are recommended. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JDBCBrokerFactorygetInstance(ConfigurationProvider cp, ClassLoader loader)Factory method for obtaining a possibly-pooled factory from properties.Map<String,Object>getProperties()Subclasses should override this method to add aPlatformproperty listing the runtime platform, such as:OpenJPA JDBC Edition: Oracle Databaseprotected BrokerImplnewBrokerImpl(String user, String pass)Return a broker configured with the proper settings.static JDBCBrokerFactorynewInstance(ConfigurationProvider cp)Factory method for constructing a factory from properties.protected StoreManagernewStoreManager()Return a new StoreManager for this runtime.voidpostCreationCallback()This method is invoked AFTER a BrokerFactory has been instantiated.protected booleansynchronizeMappings(ClassLoader loader)protected booleansynchronizeMappings(ClassLoader loader, JDBCConfiguration conf)Synchronize the mappings of the classes listed in the configuration.- 
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, pool, putUserObject, readResolve, releaseBroker, removeLifecycleListener, removeTransactionListener, setup, toPoolKey, unlock 
 - 
 
 - 
 
- 
- 
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 fromBootstrap.newBrokerFactory(). 
- 
getInstance
public static JDBCBrokerFactory getInstance(ConfigurationProvider cp, ClassLoader loader)
Factory method for obtaining a possibly-pooled factory from properties. Invoked fromBootstrap.getBrokerFactory(). 
- 
getProperties
public Map<String,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
 
- 
postCreationCallback
public void postCreationCallback()
Description copied from class:AbstractBrokerFactoryThis method is invoked AFTER a BrokerFactory has been instantiated.- Specified by:
 postCreationCallbackin interfaceBrokerFactory- Overrides:
 postCreationCallbackin 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
 
- 
newBrokerImpl
protected BrokerImpl newBrokerImpl(String user, String pass)
Description copied from class:AbstractBrokerFactoryReturn a broker configured with the proper settings. By default, this method constructs a new BrokerImpl of the class set for this factory.- Overrides:
 newBrokerImplin classAbstractBrokerFactory
 
- 
synchronizeMappings
protected boolean synchronizeMappings(ClassLoader loader, JDBCConfiguration conf)
Synchronize the mappings of the classes listed in the configuration. 
- 
synchronizeMappings
protected boolean synchronizeMappings(ClassLoader loader)
 
 - 
 
 -