public class ConnectionManagerImpl extends Object implements ConnectionManager
| Modifier and Type | Field and Description |
|---|---|
protected static Localiser |
LOCALISER
Localisation of messages.
|
| Constructor and Description |
|---|
ConnectionManagerImpl(NucleusContext context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ManagedConnection |
allocateConnection(ConnectionFactory factory,
ExecutionContext ec,
Transaction transaction,
Map options)
Method to return a connection for this ExecutionContext.
|
void |
closeAllConnections(ConnectionFactory factory,
ExecutionContext ec)
Method to close all pooled connections for the specified key of the specified factory.
|
void |
disableConnectionPool()
Disable binding objects to ExecutionContext references, so automatically
disables the connection pooling
|
ConnectionFactory |
lookupConnectionFactory(String name)
Method to lookup a connection factory and create it if not yet existing.
|
void |
registerConnectionFactory(String name,
ConnectionFactory factory)
Method to register a connection factory under a name.
|
protected static final Localiser LOCALISER
public ConnectionManagerImpl(NucleusContext context)
context - Context for this manager.public void closeAllConnections(ConnectionFactory factory, ExecutionContext ec)
closeAllConnections in interface ConnectionManagerfactory - The factoryec - The key in the poolpublic ManagedConnection allocateConnection(ConnectionFactory factory, ExecutionContext ec, Transaction transaction, Map options)
allocateConnection in interface ConnectionManagerfactory - ConnectionFactory it relates toec - Key in the pooloptions - Options for the connection (e.g isolation). These will override those of the txn itselfpublic ConnectionFactory lookupConnectionFactory(String name)
lookupConnectionFactory in interface ConnectionManagername - The lookup name "e.g "jdbc/tx"public void registerConnectionFactory(String name, ConnectionFactory factory)
registerConnectionFactory in interface ConnectionManagername - The lookup name "e.g "jdbc/tx"factory - The connection factorypublic void disableConnectionPool()
disableConnectionPool in interface ConnectionManagerCopyright © 2013. All Rights Reserved.