Class TxControl


  • public class TxControl
    extends java.lang.Object
    Transaction configuration object. We have a separate object for this so that other classes can enquire of (and use) this information.
    Since:
    JTS 2.2.
    Version:
    $Id: TxControl.java 2342 2006-03-30 13:06:17Z $
    Author:
    Mark Little (mark@arjuna.com)
    • Constructor Detail

      • TxControl

        public TxControl()
    • Method Detail

      • getDefaultTimeout

        public static final int getDefaultTimeout()
        If a timeout is not associated with a transaction when it is created then this value will be used. A value of 0 means that the transaction will never time out.
      • setDefaultTimeout

        public static final void setDefaultTimeout​(int timeout)
        Set the timeout to be associated with a newly created transaction if there is no other timeout to be used.
        Parameters:
        timeout -
      • enable

        public static final void enable()
        Start the transaction system. This allows new transactions to be created and for recovery to execute.
      • disable

        public static final void disable()
        Stop the transaction system. New transactions will be prevented but recovery will be allowed to continue.
      • disable

        public static final void disable​(boolean disableRecovery)
        Stop the transaction system. New transactions will be prevented and recovery will cease. WARNING: make sure you know what you are doing when you call this routine!
      • isEnabled

        public static final boolean isEnabled()
      • getAsyncPrepare

        public static final boolean getAsyncPrepare()
        Returns:
        the ObjectStore implementation which the transaction coordinator will use.
        See Also:
        ObjectStore
      • getMaintainHeuristics

        public static final boolean getMaintainHeuristics()
      • isReadonlyOptimisation

        public static boolean isReadonlyOptimisation()
      • getXANodeName

        public static final java.lang.String getXANodeName()
      • getXaNodeNameBytes

        public static final byte[] getXaNodeNameBytes()
      • setXANodeName

        public static void setXANodeName​(java.lang.String name)
      • isBeforeCompletionWhenRollbackOnly

        public static boolean isBeforeCompletionWhenRollbackOnly()