Package org.alfresco.repo.transaction
Class TransactionUtil
java.lang.Object
org.alfresco.repo.transaction.TransactionUtil
Deprecated.
Class containing transactions helper methods and interfaces.
- Author:
- Derek Hulley
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <R> RexecuteInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork) Deprecated.Use aRetryingTransactionHelperinstancestatic <R> RexecuteInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly) Deprecated.Use aRetryingTransactionHelperinstancestatic <R> RexecuteInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork) Deprecated.Use aRetryingTransactionHelperinstancestatic <R> RexecuteInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly) Deprecated.Use aRetryingTransactionHelperinstancestatic voidflush()Deprecated.Flush transaction.
-
Constructor Details
-
TransactionUtil
public TransactionUtil()Deprecated.
-
-
Method Details
-
flush
public static void flush()Deprecated.Flush transaction. -
executeInUserTransaction
public static <R> R executeInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork) Deprecated.Use aRetryingTransactionHelperinstanceExecute the transaction work in a user transaction- Parameters:
transactionService- the transaction servicetransactionWork- the transaction work- Throws:
RuntimeException- if the transaction was rolled back
-
executeInUserTransaction
public static <R> R executeInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly) Deprecated.Use aRetryingTransactionHelperinstanceExecute the transaction work in a user transaction. Any current transaction will be continued.- Parameters:
transactionService- the transaction servicetransactionWork- the transaction workreadOnly- true if the transaction should be read-only- Throws:
RuntimeException- if the transaction was rolled back
-
executeInNonPropagatingUserTransaction
public static <R> R executeInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork) Deprecated.Use aRetryingTransactionHelperinstanceExecute the transaction work in a writable, non-propagating user transaction. Any current transaction will be suspended a new one started.- Parameters:
transactionService- the transaction servicetransactionWork- the transaction work- Throws:
RuntimeException- if the transaction was rolled back
-
executeInNonPropagatingUserTransaction
public static <R> R executeInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly) Deprecated.Use aRetryingTransactionHelperinstanceExecute the transaction work in a non-propagating user transaction. Any current transaction will be suspended a new one started.- Parameters:
transactionService- the transaction servicetransactionWork- the transaction workreadOnly- true if the transaction should be read-only- Throws:
RuntimeException- if the transaction was rolled back
-
RetryingTransactionHelperinstance