public class JtaStatusHelper extends Object
Constructor and Description |
---|
JtaStatusHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
getStatus(TransactionManager transactionManager)
Extract the status code from the current
Transaction associated with the
given TransactionManager |
static int |
getStatus(UserTransaction userTransaction)
Extract the status code from a
UserTransaction |
static boolean |
isActive(int status)
Does the given status code indicate an active transaction?
|
static boolean |
isActive(TransactionManager transactionManager)
Does the status code obtained from the given
TransactionManager indicate an active transaction? |
static boolean |
isActive(UserTransaction userTransaction)
Does the status code obtained from the given
UserTransaction indicate an active transaction? |
static boolean |
isCommitted(int status)
Does the given status code indicate a committed transaction?
|
static boolean |
isCommitted(TransactionManager transactionManager)
Does the status code obtained from the given
TransactionManager indicate a commit? |
static boolean |
isCommitted(UserTransaction userTransaction)
Does the status code obtained from the given
UserTransaction indicate a commit? |
static boolean |
isMarkedForRollback(int status)
Does the given status code indicate the transaction has been marked for rollback?
|
static boolean |
isRollback(int status)
Does the given status code indicate a rolled back transaction?
|
static boolean |
isRollback(TransactionManager transactionManager)
Does the status code obtained from the given
TransactionManager indicate a roll back? |
static boolean |
isRollback(UserTransaction userTransaction)
Does the status code obtained from the given
UserTransaction indicate a roll back? |
public static int getStatus(UserTransaction userTransaction)
UserTransaction
userTransaction
- The UserTransaction
from which to extract the status.TransactionException
- If the UserTransaction
reports the status as unknownpublic static int getStatus(TransactionManager transactionManager)
Transaction
associated with the
given TransactionManager
transactionManager
- The TransactionManager
from which to extract the status.TransactionException
- If the TransactionManager
reports the status as unknownpublic static boolean isActive(int status)
status
- The transaction status code to checkpublic static boolean isActive(UserTransaction userTransaction)
UserTransaction
indicate an active transaction?userTransaction
- The UserTransaction
whose status is to be checkedpublic static boolean isActive(TransactionManager transactionManager)
TransactionManager
indicate an active transaction?transactionManager
- The TransactionManager
whose status is to be checkedpublic static boolean isRollback(int status)
status
- The transaction status code to checkpublic static boolean isRollback(UserTransaction userTransaction)
UserTransaction
indicate a roll back?userTransaction
- The UserTransaction
whose status is to be checkedpublic static boolean isRollback(TransactionManager transactionManager)
TransactionManager
indicate a roll back?transactionManager
- The TransactionManager
whose status is to be checkedpublic static boolean isCommitted(int status)
status
- The transaction status code to checkpublic static boolean isCommitted(UserTransaction userTransaction)
UserTransaction
indicate a commit?userTransaction
- The UserTransaction
whose status is to be checkedpublic static boolean isCommitted(TransactionManager transactionManager)
TransactionManager
indicate a commit?transactionManager
- The TransactionManager
whose status is to be checkedpublic static boolean isMarkedForRollback(int status)
status
- The transaction status code to checkCopyright © 2001-2013 Red Hat, Inc. All Rights Reserved.