| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.engine.transaction.internal.jta.JtaStatusHelper
public class JtaStatusHelper
Utility for dealing with JTA statuses.
| Constructor Summary | |
|---|---|
| JtaStatusHelper() | |
| Method Summary | |
|---|---|
| static int | getStatus(TransactionManager transactionManager)Extract the status code from the current Transactionassociated with the
 givenTransactionManager | 
| 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 TransactionManagerindicate an active transaction? | 
| static boolean | isActive(UserTransaction userTransaction)Does the status code obtained from the given UserTransactionindicate 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 TransactionManagerindicate a commit? | 
| static boolean | isCommitted(UserTransaction userTransaction)Does the status code obtained from the given UserTransactionindicate 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 TransactionManagerindicate a roll back? | 
| static boolean | isRollback(UserTransaction userTransaction)Does the status code obtained from the given UserTransactionindicate a roll back? | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public JtaStatusHelper()
| Method Detail | 
|---|
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 check
public static boolean isActive(UserTransaction userTransaction)
UserTransaction indicate an active transaction?
userTransaction - The UserTransaction whose status is to be checked
public static boolean isActive(TransactionManager transactionManager)
TransactionManager indicate an active transaction?
transactionManager - The TransactionManager whose status is to be checked
public static boolean isRollback(int status)
status - The transaction status code to check
public static boolean isRollback(UserTransaction userTransaction)
UserTransaction indicate a roll back?
userTransaction - The UserTransaction whose status is to be checked
public static boolean isRollback(TransactionManager transactionManager)
TransactionManager indicate a roll back?
transactionManager - The TransactionManager whose status is to be checked
public static boolean isCommitted(int status)
status - The transaction status code to check
public static boolean isCommitted(UserTransaction userTransaction)
UserTransaction indicate a commit?
userTransaction - The UserTransaction whose status is to be checked
public static boolean isCommitted(TransactionManager transactionManager)
TransactionManager indicate a commit?
transactionManager - The TransactionManager whose status is to be checked
public static boolean isMarkedForRollback(int status)
status - The transaction status code to check
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||