com.sun.jts.CosTransactions
Class CurrentTransaction

java.lang.Object
  extended by com.sun.jts.CosTransactions.CurrentTransaction

public class CurrentTransaction
extends java.lang.Object

This class manages association of transactions with threads in a process, and associated state/operations.

Version:
0.01
Author:
Simon Holdsworth, IBM Corporation
See Also:

Constructor Summary
CurrentTransaction()
           
 
Method Summary
static ControlImpl getCurrent()
          Returns the current Control object.
static boolean isTxAssociated()
           
static void recreate(GlobalTID tid, int timeout)
          Recreates a transaction based on the information contained in the transaction id (tid) and associates the current thread of control with the recreated transaction.
static void release(GlobalTID tid)
          Disassociates the current thread of control from the specified transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentTransaction

public CurrentTransaction()
Method Detail

isTxAssociated

public static boolean isTxAssociated()

getCurrent

public static ControlImpl getCurrent()
                              throws org.omg.CORBA.TRANSACTION_ROLLEDBACK
Returns the current Control object.

That is, the Control object that corresponds to the thread under which the operation was invoked. If there is no such association the null value is returned.

Parameters:
-
Returns:
The current Control object.
Throws:
org.omg.CORBA.TRANSACTION_ROLLEDBACK
See Also:

recreate

public static void recreate(GlobalTID tid,
                            int timeout)
Recreates a transaction based on the information contained in the transaction id (tid) and associates the current thread of control with the recreated transaction.

Parameters:
tid - the transaction id.

release

public static void release(GlobalTID tid)
Disassociates the current thread of control from the specified transaction.

Parameters:
tid - the transaction id.


Copyright © 2012 GlassFish Community. All Rights Reserved.