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.AbstractConnectionFactory
ConnectionFactory 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 void
close()
org.datanucleus.store.connection.ManagedConnection
createManagedConnection(org.datanucleus.ExecutionContext ec, Map options)
Method to create a new ManagedConnection.protected void
initialiseDataSource()
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:
close
in interfaceorg.datanucleus.store.connection.ConnectionFactory
- Overrides:
close
in 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
-
-