org.apache.ojb.otm.transaction
Class LocalTransactionFactory

java.lang.Object
  extended byorg.apache.ojb.otm.transaction.LocalTransactionFactory
All Implemented Interfaces:
TransactionFactory

public class LocalTransactionFactory
extends java.lang.Object
implements TransactionFactory

Factory for local transactions. Each OTMConnection is associated with exactly one transaction.

Author:
Raghu Rajah

Constructor Summary
LocalTransactionFactory()
           
 
Method Summary
 OTMConnection acquireConnection(PBKey pbKey)
          Acquire new connection.
 Transaction getTransactionForConnection(OTMConnection connection)
          Get the current Transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalTransactionFactory

public LocalTransactionFactory()
Method Detail

getTransactionForConnection

public Transaction getTransactionForConnection(OTMConnection connection)
Description copied from interface: TransactionFactory
Get the current Transaction.

Specified by:
getTransactionForConnection in interface TransactionFactory
Returns:
the current Transaction
See Also:
TransactionFactory.getTransactionForConnection(OTMConnection)

acquireConnection

public OTMConnection acquireConnection(PBKey pbKey)
Description copied from interface: TransactionFactory
Acquire new connection. Creates a new connection. Depending on the implementation of the factory the connection could be associated to an existing transaction, or not.

Specified by:
acquireConnection in interface TransactionFactory
Returns:
new connection
See Also:
TransactionFactory.acquireConnection(PBKey)


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14