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
ConstructorsConstructorDescriptionConstruct the factory with the given option settings; however, the factory construction methods are recommended. -
Method Summary
Modifier and TypeMethodDescriptionstatic JDBCBrokerFactorygetInstance(ConfigurationProvider cp, ClassLoader loader) Factory method for obtaining a possibly-pooled factory from properties.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 JDBCBrokerFactoryFactory method for constructing a factory from properties.protected StoreManagerReturn a new StoreManager for this runtime.voidThis 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 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: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
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
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
Synchronize the mappings of the classes listed in the configuration. -
synchronizeMappings
-