org.jboss.jca.core.spi.transaction

## Class TxUtils

- java.lang.Object
- - org.jboss.jca.core.spi.transaction.TxUtils

-     public class TxUtils
      extends java.lang.Object

  Helper methods for transaction status and textual representation
  Author:
    Jesper Pedersen

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getStatusAsString(int status)` Converts a transaction status to a text representation
    `static boolean` | `isActive(javax.transaction.Transaction tx)` Is the transaction active
    `static boolean` | `isCompleted(javax.transaction.Transaction tx)` Is the transaction completed
    `static boolean` | `isUncommitted(javax.transaction.Transaction tx)` Is the transaction uncommitted

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### isActive

          public static boolean isActive(javax.transaction.Transaction tx)

      Is the transaction active
      Parameters:
        `tx` - The transaction
      Returns:
        True if active; otherwise false

    - #### isUncommitted

          public static boolean isUncommitted(javax.transaction.Transaction tx)

      Is the transaction uncommitted
      Parameters:
        `tx` - The transaction
      Returns:
        True if uncommitted; otherwise false

    - #### isCompleted

          public static boolean isCompleted(javax.transaction.Transaction tx)

      Is the transaction completed
      Parameters:
        `tx` - The transaction
      Returns:
        True if completed; otherwise false

    - #### getStatusAsString

          public static java.lang.String getStatusAsString(int status)

      Converts a transaction status to a text representation
      Parameters:
        `status` - The status index
      Returns:
        status as String or "STATUS_INVALID(value)"
      See Also:
        `Status`

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)