| |
|
| java.lang.Object org.ofbiz.entity.transaction.TransactionUtil
TransactionUtil | public class TransactionUtil implements Status(Code) | | Transaction Utility to help with some common transaction tasks
Provides a wrapper around the transaction objects to allow for changes in underlying implementations in the future.
author: David E. Jones version: $Revision: 1.4 $ since: 2.0 |
Inner Class :public static class StampClearSync implements Synchronization | |
begin | public static boolean begin() throws GenericTransactionException(Code) | | Begins a transaction in the current thread IF transactions are available; only
tries if the current transaction status is ACTIVE, if not active it returns false.
If and on only if it begins a transaction it will return true. In other words, if
a transaction is already in place it will return false and do nothing.
|
begin | public static boolean begin(int timeout) throws GenericTransactionException(Code) | | Begins a transaction in the current thread IF transactions are available; only
tries if the current transaction status is ACTIVE, if not active it returns false.
If and on only if it begins a transaction it will return true. In other words, if
a transaction is already in place it will return false and do nothing.
|
clearTransactionStamps | protected static void clearTransactionStamps()(Code) | | |
commit | public static void commit(boolean beganTransaction) throws GenericTransactionException(Code) | | Commits the transaction in the current thread IF transactions are available
AND if beganTransaction is true
|
getStatus | public static int getStatus() throws GenericTransactionException(Code) | | Gets the status of the transaction in the current thread IF
transactions are available, otherwise returns STATUS_NO_TRANSACTION
|
getTransactionStartStamp | public static Timestamp getTransactionStartStamp()(Code) | | |
getTransactionStateString | public static String getTransactionStateString(int state)(Code) | | |
getTransactionUniqueNowStamp | public static Timestamp getTransactionUniqueNowStamp()(Code) | | |
rollback | public static void rollback(boolean beganTransaction) throws GenericTransactionException(Code) | | Rolls back transaction in the current thread IF transactions are available
AND if beganTransaction is true; if beganTransaction is not true,
setRollbackOnly is called to insure that the transaction will be rolled back
|
setRollbackOnly | public static void setRollbackOnly() throws GenericTransactionException(Code) | | Makes a roll back the only possible outcome of the transaction in the current thread IF transactions are available
|
setTransactionTimeout | public static void setTransactionTimeout(int seconds) throws GenericTransactionException(Code) | | Sets the timeout of the transaction in the current thread IF transactions are available
|
|
|
|