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
BrokerFactory type for use with the JDBC runtime.
- Author:
- Abe White, Marc Prud'hommeaux
- See Also:
-
Constructor Summary
ConstructorDescriptionConstruct the factory with the given option settings; however, the factory construction methods are recommended. -
Method Summary
Modifier and TypeMethodDescriptionstatic JDBCBrokerFactory
getInstance
(ConfigurationProvider cp, ClassLoader loader) Factory method for obtaining a possibly-pooled factory from properties.Subclasses should override this method to add aPlatform
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
Factory method for constructing a factory from properties.protected StoreManager
Return a new StoreManager for this runtime.void
This method is invoked AFTER a BrokerFactory has been instantiated.protected boolean
synchronizeMappings
(ClassLoader loader) protected boolean
synchronizeMappings
(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 Details
-
JDBCBrokerFactory
Construct the factory with the given option settings; however, the factory construction methods are recommended.
-
-
Method Details
-
newInstance
Factory method for constructing a factory from properties. Invoked fromBootstrap.newBrokerFactory()
. -
getInstance
Factory method for obtaining a possibly-pooled factory from properties. Invoked fromBootstrap.getBrokerFactory()
. -
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
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
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
Synchronize the mappings of the classes listed in the configuration. -
synchronizeMappings
-