org.jboss.jca.core.spi.transaction
Class TxUtils

java.lang.Object
  extended by org.jboss.jca.core.spi.transaction.TxUtils

public class TxUtils
extends Object

Helper methods for transaction status and textual representation

Author:
Jesper Pedersen

Method Summary
static String getStatusAsString(int status)
          Converts a transaction status to a text representation
static boolean isActive(Transaction tx)
          Is the transaction active
static boolean isCompleted(Transaction tx)
          Is the transaction completed
static boolean isUncommitted(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(Transaction tx)
Is the transaction active

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

isUncommitted

public static boolean isUncommitted(Transaction tx)
Is the transaction uncommitted

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

isCompleted

public static boolean isCompleted(Transaction tx)
Is the transaction completed

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

getStatusAsString

public static 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 © 2012 JBoss, by Red Hat (http://www.jboss.org/ironjacamar)