tyrex.tm.impl

Class TransactionManagerImpl

final class TransactionManagerImpl extends Object implements TransactionManager, Status, TyrexTransactionManager

Implements a local transaction manager. The transaction manager allows the application server to manage transactions on the local thread through the TransactionManager interface.

Nested transactions are supported if the server configuration indicates so, but all nested transactions appear as flat transactions to the resources and are not registered with the transaction server.

Version: $Revision: 1.19 $ $Date: 2001/10/05 22:15:34 $

Author: Assaf Arkin

See Also: Tyrex#recycleThread TransactionDomain TransactionImpl

Constructor Summary
TransactionManagerImpl(TransactionDomainImpl txDomain)
Method Summary
voidbegin()
voidcommit()
voiddelistResource(XAResource xaResource, int flag)
voiddumpCurrentTransaction(PrintWriter writer)
voiddumpTransactionList(PrintWriter writer)
voidenlistResource(XAResource xaResource)
voidenlistResource(XAResource xaResource, XAResourceCallback callback)
intgetStatus()
TransactiongetTransaction()
TransactiongetTransaction(Xid xid)
TransactiongetTransaction(String xid)
TransactiongetTransaction(Thread thread)
Returns the transaction currently associated with the given thread, or null if the thread is not associated with any transaction.
protected voidinternalResume(TransactionImpl tx)
Called to resume the current transaction, but does not attempt to associate the resources with this transaction.
voidresume(Transaction tx)
voidrollback()
voidsetRollbackOnly()
voidsetTransactionTimeout(int seconds)
Transactionsuspend()

Constructor Detail

TransactionManagerImpl

TransactionManagerImpl(TransactionDomainImpl txDomain)

Method Detail

begin

public void begin()

commit

public void commit()

delistResource

public void delistResource(XAResource xaResource, int flag)

dumpCurrentTransaction

public void dumpCurrentTransaction(PrintWriter writer)

dumpTransactionList

public void dumpTransactionList(PrintWriter writer)

enlistResource

public void enlistResource(XAResource xaResource)

enlistResource

public void enlistResource(XAResource xaResource, XAResourceCallback callback)

getStatus

public int getStatus()

getTransaction

public Transaction getTransaction()

getTransaction

public Transaction getTransaction(Xid xid)

getTransaction

public Transaction getTransaction(String xid)

getTransaction

public Transaction getTransaction(Thread thread)
Returns the transaction currently associated with the given thread, or null if the thread is not associated with any transaction. This method is equivalent to calling TransactionManager#getTransaction from within the thread.

Parameters: thread The thread to lookup

Returns: The transaction currently associated with that thread

internalResume

protected void internalResume(TransactionImpl tx)
Called to resume the current transaction, but does not attempt to associate the resources with this transaction. This method is used during the synchronization.

resume

public void resume(Transaction tx)

rollback

public void rollback()

setRollbackOnly

public void setRollbackOnly()

setTransactionTimeout

public void setTransactionTimeout(int seconds)

suspend

public Transaction suspend()
Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.