All Implemented Interfaces:
SubordinateTransaction, Transaction, jakarta.transaction.Transaction, org.jboss.tm.ImportedTransaction

public class TransactionImple extends TransactionImple implements SubordinateTransaction
  • Constructor Details

    • TransactionImple

      public TransactionImple(int timeout)
      Deprecated.
      Only used by tests
      Create a new transaction with the specified timeout.
    • TransactionImple

      public TransactionImple(int timeout, Xid importedXid)
    • TransactionImple

      public TransactionImple(Uid actId)
      Used for failure recovery.
      Parameters:
      actId - the transaction state to recover.
  • Method Details

    • getParentNodeName

      public String getParentNodeName()
    • recordTransaction

      public final void recordTransaction()
    • toString

      public String toString()
      Overrides:
      toString in class TransactionImple
    • baseXid

      public final Xid baseXid()
      If this is an imported transaction (via JCA) then this will be the Xid we are pretending to be. Otherwise, it will be null.
      Specified by:
      baseXid in interface org.jboss.tm.ImportedTransaction
      Specified by:
      baseXid in interface SubordinateTransaction
      Overrides:
      baseXid in class TransactionImple
      Returns:
      null if we are a local transaction, a valid Xid if we have been imported.
    • getId

      public Object getId()
      Description copied from interface: org.jboss.tm.ImportedTransaction
      get a unique identifier for this transaction
      Specified by:
      getId in interface org.jboss.tm.ImportedTransaction
      Returns:
      an opaque id
    • recover

      public void recover()
      Force this transaction to try to recover itself again.
      Specified by:
      recover in interface org.jboss.tm.ImportedTransaction
      Specified by:
      recover in interface SubordinateTransaction
    • activated

      public boolean activated()
      Has the transaction been activated successfully? If not, we wait and try again later.
      Specified by:
      activated in interface org.jboss.tm.ImportedTransaction
      Specified by:
      activated in interface SubordinateTransaction
      Overrides:
      activated in class TransactionImple
      Returns:
      true if the transaction was activated, false otherwise.