Class CurrentTransaction


  • public class CurrentTransaction
    extends Object
    This class manages association of transactions with threads in a process, and associated state/operations.
    Version:
    0.01
    Author:
    Simon Holdsworth, IBM Corporation
    • 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.

        Returns:
        The current Control object.
        Throws:
        org.omg.CORBA.TRANSACTION_ROLLEDBACK
      • 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.