org.datanucleus
Interface ConnectionManager

All Known Implementing Classes:
ConnectionManagerImpl

public interface ConnectionManager

Manager of connections for an OMF, allowing ManagedConnection pooling, enlistment in transaction. The pool caches one connection per ObjectManager. The "allocateConnection" method can create connections and enlist them (like most normal persistence operations need) or create a connection and return it without enlisting it into a transaction, for example the connections used to generate object identity, create the database schema or obtaining the schema metadata. Connections can be locked per ObjectManager basis. Locking of connections is used to handle the connection over to the user application. A locked connection denies any further access to the datastore, until the user application unlock it.

Version:
$Revision: 1.13 $

Method Summary
 ManagedConnection allocateConnection(ConnectionFactory factory, ObjectManager om, java.util.Map options)
          Allocate a connection using the specified factory (unless we already have one cached for this ObjectManager).
 

Method Detail

allocateConnection

ManagedConnection allocateConnection(ConnectionFactory factory,
                                     ObjectManager om,
                                     java.util.Map options)
Allocate a connection using the specified factory (unless we already have one cached for this ObjectManager).

Parameters:
factory - The ConnectionFactory to create any new connection with
om - The ObjectManager
options - Any options for allocating the connection (e.g isolation)
Returns:
The ManagedConnection


Copyright © 2009. All Rights Reserved.