|
Nuxeo Enterprise Platform 5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nuxeo.runtime.transaction.TransactionHelper
public class TransactionHelper
Utilities to work with transactions.
Field Summary | |
---|---|
static String[] |
TM_NAMES
Various binding names for the TransactionManager. |
static String[] |
UT_NAMES
Various binding names for the UserTransaction. |
Method Summary | |
---|---|
static void |
commitOrRollbackTransaction()
Commits or rolls back the User Transaction depending on the transaction status. |
static String |
getUserTransactionJNDIName()
Returns the UserTransaction JNDI binding name. |
static boolean |
isTransactionActive()
Checks if the current User Transaction is active. |
static boolean |
isTransactionActiveOrMarkedRollback()
Checks if the current User Transaction is active or marked rollback only. |
static boolean |
isTransactionMarkedRollback()
Checks if the current User Transaction is marked rollback only. |
static TransactionManager |
lookupTransactionManager()
Looks up the TransactionManager in JNDI. |
static UserTransaction |
lookupUserTransaction()
Looks up the User Transaction in JNDI. |
static boolean |
setTransactionRollbackOnly()
Sets the current User Transaction as rollback only. |
static boolean |
startTransaction()
Starts a new User Transaction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] UT_NAMES
public static final String[] TM_NAMES
Method Detail |
---|
public static UserTransaction lookupUserTransaction() throws NamingException
NamingException
- if not foundpublic static String getUserTransactionJNDIName()
Assumes lookupUserTransaction()
has been called once before.
public static TransactionManager lookupTransactionManager() throws NamingException
NamingException
- if not foundpublic static boolean isTransactionActive()
public static boolean isTransactionMarkedRollback()
public static boolean isTransactionActiveOrMarkedRollback()
public static boolean startTransaction()
true
if the transaction was successfully started, false
otherwisepublic static void commitOrRollbackTransaction()
SystemException
HeuristicRollbackException
HeuristicMixedException
RollbackException
IllegalStateException
SecurityException
public static boolean setTransactionRollbackOnly()
true
if the transaction was successfully marked rollback
only, false
otherwise
|
Nuxeo Enterprise Platform 5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |