org.datanucleus
Class ConnectionManagerImpl
java.lang.Object
org.datanucleus.ConnectionManagerImpl
- All Implemented Interfaces:
- ConnectionManager
public class ConnectionManagerImpl
- extends java.lang.Object
- implements ConnectionManager
Manager of connections for an OMF, allowing ManagedConnection pooling, enlistment in transaction.
The pool caches one connection per ObjectManager.
The "allocate" method can create connections and enlist them (like most normal persistence operations need)
or create a connection and return it.
- Version:
- $Revision: 1.17 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCALISER
protected static final Localiser LOCALISER
- Localisation of messages.
ConnectionManagerImpl
public ConnectionManagerImpl(OMFContext omfContext)
- Constructor.
- Parameters:
omfContext - OMFContext for this manager.
allocateConnection
public ManagedConnection allocateConnection(ConnectionFactory factory,
ObjectManager om,
java.util.Map options)
- Method to return a connection for this ObjectManager.
If a connection for the ObjectManager exists in the cache will return it.
If no connection exists will create a new one using the ConnectionFactory.
- Specified by:
allocateConnection in interface ConnectionManager
- Parameters:
factory - ConnectionFactory it relates toom - The ObjectManageroptions - Options for the connection (e.g isolation). These will override those of the txn itself
- Returns:
- The ManagedConnection
Copyright © 2009. All Rights Reserved.