org.exolab.castor.jdo.engine

Class TransactionContextImpl

final class TransactionContextImpl extends TransactionContext

A transaction context is required in order to perform operations against the database. The transaction context is mapped to javax.transaction.Transaction for the ODMG API and into javax.transaction.xa.XAResource for XA databases. The only way to begin a new transaction is through the creation of a new transaction context. All database access must be performed through a transaction context.

Version: $Revision: 1.14 $ $Date: 2005/07/24 17:48:18 $

Author: Assaf Arkin

Constructor Summary
TransactionContextImpl(Database db, boolean globalTx)
Create a new transaction context.
TransactionContextImpl(Database db, boolean globalTx, Transaction transaction)
Create a new transaction context.
Method Summary
protected voidcloseConnections()
protected voidcommitConnections()
ConnectiongetConnection(LockEngine engine)
DbMetaInfogetConnectionInfo(LockEngine engine)
protected voidrollbackConnections()

Constructor Detail

TransactionContextImpl

public TransactionContextImpl(Database db, boolean globalTx)
Create a new transaction context.

TransactionContextImpl

public TransactionContextImpl(Database db, boolean globalTx, Transaction transaction)
Create a new transaction context.

Parameters: db Database instance globalTx Indicates whether we run as part of a global transaction. transaction A JTA Transasction instance.

Method Detail

closeConnections

protected void closeConnections()

commitConnections

protected void commitConnections()

getConnection

public Connection getConnection(LockEngine engine)

getConnectionInfo

public DbMetaInfo getConnectionInfo(LockEngine engine)

Returns: DbMetaInfo object with database connection information

rollbackConnections

protected void rollbackConnections()
Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com