tyrex.tm
Interface TyrexTransactionManager

All Superinterfaces:
javax.transaction.TransactionManager

public interface TyrexTransactionManager
extends javax.transaction.TransactionManager

Tyrex extensions for TransactionManager. All Tyrex transaction managers implement this interface, which supports transaction resolving from an Xid, and means to obtain extended transaction status.

Author:
Riad Mohammed

Method Summary
 void delistResource(javax.transaction.xa.XAResource xaResource, int flag)
          Called to delist a resource from the current thread.
 void dumpCurrentTransaction(java.io.PrintWriter writer)
          Convenience method.
 void dumpTransactionList(java.io.PrintWriter writer)
          Convenience method.
 void enlistResource(javax.transaction.xa.XAResource xaResource)
          Called to enlist a resource with the current thread.
 void enlistResource(javax.transaction.xa.XAResource xaResource, XAResourceCallback callback)
          Called to enlist a resource with the current thread.
 javax.transaction.Transaction getTransaction(java.lang.String xid)
          Returns a transaction based on the transaction identifier.
 javax.transaction.Transaction getTransaction(javax.transaction.xa.Xid xid)
          Returns a transaction based on the transaction identifier.
 
Methods inherited from interface javax.transaction.TransactionManager
begin, commit, getStatus, getTransaction, resume, rollback, setRollbackOnly, setTransactionTimeout, suspend
 

Method Detail

getTransaction

public javax.transaction.Transaction getTransaction(javax.transaction.xa.Xid xid)
Returns a transaction based on the transaction identifier.

Parameters:
xid - The transaction identifier
Returns:
The transaction, or null if no such transaction exists

getTransaction

public javax.transaction.Transaction getTransaction(java.lang.String xid)
Returns a transaction based on the transaction identifier.

Parameters:
xid - The transaction identifier
Returns:
The transaction, or null if no such transaction exists

dumpTransactionList

public void dumpTransactionList(java.io.PrintWriter writer)
Convenience method. Dumps information about all active transactions created by this transaction manager.

Parameters:
writer - The writer to use

dumpCurrentTransaction

public void dumpCurrentTransaction(java.io.PrintWriter writer)
Convenience method. Dumps information about the transaction associated with the current thread.

Parameters:
writer - The writer to use

enlistResource

public void enlistResource(javax.transaction.xa.XAResource xaResource)
                    throws javax.transaction.SystemException
Called to enlist a resource with the current thread. If this method is called within an active transaction, the connection will be enlisted in that transaction. The connection will be enlisted in any future transaction associated with the same thread context.

Throws:
javax.transaction.SystemException - The resource cannot be enlisted with the current transaction

enlistResource

public void enlistResource(javax.transaction.xa.XAResource xaResource,
                           XAResourceCallback callback)
                    throws javax.transaction.SystemException
Called to enlist a resource with the current thread. If this method is called within an active transaction, the connection will be enlisted in that transaction. The connection will be enlisted in any future transaction associated with the same thread context.

Parameters:
callback - The callback (optional)
Throws:
javax.transaction.SystemException - The resource cannot be enlisted with the current transaction
See Also:
XAResourceCallback

delistResource

public void delistResource(javax.transaction.xa.XAResource xaResource,
                           int flag)
Called to delist a resource from the current thread. If this method is called within an active transaction, the connection will be delisted using the success flag. The connection will not be enlisted in any future transaction associated with the same thread context.

Parameters:
flag - The delist flag


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.