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:
java.io.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 JDBCBrokerFactory
getInstance(ConfigurationProvider cp, java.lang.ClassLoader loader)
Factory method for obtaining a possibly-pooled factory from properties.java.util.Map<java.lang.String,java.lang.Object>
getProperties()
Subclasses should override this method to add aPlatform
property listing the runtime platform, such as:OpenJPA JDBC Edition: Oracle Database
protected BrokerImpl
newBrokerImpl(java.lang.String user, java.lang.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.void
postCreationCallback()
This method is invoked AFTER a BrokerFactory has been instantiated.protected boolean
synchronizeMappings(java.lang.ClassLoader loader)
protected boolean
synchronizeMappings(java.lang.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, java.lang.ClassLoader loader)
Factory method for obtaining a possibly-pooled factory from properties. Invoked fromBootstrap.getBrokerFactory()
.
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Description copied from class:AbstractBrokerFactory
Subclasses should override this method to add aPlatform
property listing the runtime platform, such as:OpenJPA JDBC Edition: Oracle Database
- Specified by:
getProperties
in interfaceBrokerFactory
- Overrides:
getProperties
in classAbstractBrokerFactory
-
postCreationCallback
public void postCreationCallback()
Description copied from class:AbstractBrokerFactory
This method is invoked AFTER a BrokerFactory has been instantiated.- Specified by:
postCreationCallback
in interfaceBrokerFactory
- Overrides:
postCreationCallback
in classAbstractBrokerFactory
-
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 theAbstractBrokerFactory.newBroker()
method.- Specified by:
newStoreManager
in classAbstractBrokerFactory
-
newBrokerImpl
protected BrokerImpl newBrokerImpl(java.lang.String user, java.lang.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 classAbstractBrokerFactory
-
synchronizeMappings
protected boolean synchronizeMappings(java.lang.ClassLoader loader, JDBCConfiguration conf)
Synchronize the mappings of the classes listed in the configuration.
-
synchronizeMappings
protected boolean synchronizeMappings(java.lang.ClassLoader loader)
-
-