org.datanucleus
Interface ConnectionFactory


public interface ConnectionFactory

Factory for connections to the datastore. To be implemented by all StoreManagers.

Version:
$Revision: 1.13 $

Method Summary
 ManagedConnection createManagedConnection(ObjectManager om, java.util.Map transactionOptions)
          Create the ManagedConnection.
 ManagedConnection getConnection(ObjectManager om, java.util.Map options)
          Obtain a connection from the Factory.
 

Method Detail

getConnection

ManagedConnection getConnection(ObjectManager om,
                                java.util.Map options)
Obtain a connection from the Factory. The connection will be enlisted within the Transaction associated to the ObjectManager om if "enlist" is set to true.

Parameters:
om - the ObjectManager or null
options - Any options for then creating the connection
Returns:
the ManagedConnection

createManagedConnection

ManagedConnection createManagedConnection(ObjectManager om,
                                          java.util.Map transactionOptions)
Create the ManagedConnection. Only used by ConnectionManager so do not call this.

Parameters:
om - ObjectManager (if any)
transactionOptions - the Transaction options this connection will be enlisted to, null if non existent
Returns:
The ManagedConnection.


Copyright © 2009. All Rights Reserved.