Package org.datanucleus.store.rdbms
Class ConnectionFactoryImpl
- java.lang.Object
-
- org.datanucleus.store.connection.AbstractConnectionFactory
-
- org.datanucleus.store.rdbms.ConnectionFactoryImpl
-
- All Implemented Interfaces:
org.datanucleus.store.connection.ConnectionFactory
public class ConnectionFactoryImpl extends org.datanucleus.store.connection.AbstractConnectionFactoryConnectionFactory for RDBMS datastores. Each instance is a factory of transactional or non-transactional connections, obtained through a javax.sql.DataSource.
-
-
Constructor Summary
Constructors Constructor Description ConnectionFactoryImpl(org.datanucleus.store.StoreManager storeMgr, String resourceName)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.datanucleus.store.connection.ManagedConnectioncreateManagedConnection(org.datanucleus.ExecutionContext ec, Map options)Method to create a new ManagedConnection.protected voidinitialiseDataSource()Method to initialise the DataSource used by this ConnectionFactory.
-
-
-
Constructor Detail
-
ConnectionFactoryImpl
public ConnectionFactoryImpl(org.datanucleus.store.StoreManager storeMgr, String resourceName)Constructor.- Parameters:
storeMgr- Store ManagerresourceName- either tx or nontx
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceorg.datanucleus.store.connection.ConnectionFactory- Overrides:
closein classorg.datanucleus.store.connection.AbstractConnectionFactory
-
initialiseDataSource
protected void initialiseDataSource()
Method to initialise the DataSource used by this ConnectionFactory. Only invoked when the request for the first connection comes in.
-
createManagedConnection
public org.datanucleus.store.connection.ManagedConnection createManagedConnection(org.datanucleus.ExecutionContext ec, Map options)Method to create a new ManagedConnection.- Parameters:
ec- the object that is bound the connection during its lifecycle (if for a PM/EM operation)options- Options for creating the connection (optional)- Returns:
- The ManagedConnection
-
-