public class DefaultCompensatingTransactionOperationManager extends java.lang.Object implements CompensatingTransactionOperationManager
CompensatingTransactionOperationManager.
Manages a stack of CompensatingTransactionOperationExecutor objects
and performs rollback of these in the reverse order.| Constructor and Description |
|---|
DefaultCompensatingTransactionOperationManager(CompensatingTransactionOperationFactory operationFactory)
Set the
CompensatingTransactionOperationFactory to use. |
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Commit all recorded operations.
|
protected java.util.Stack |
getOperationExecutors()
Get the rollback operations.
|
void |
performOperation(java.lang.Object resource,
java.lang.String operation,
java.lang.Object[] args)
Indicates that the supplied operation (method name) is to be performed.
|
void |
rollback()
Rollback all recorded operations by performing each of the recorded
rollback operations.
|
public DefaultCompensatingTransactionOperationManager(CompensatingTransactionOperationFactory operationFactory)
CompensatingTransactionOperationFactory to use.operationFactory - the CompensatingTransactionOperationFactory.public void performOperation(java.lang.Object resource,
java.lang.String operation,
java.lang.Object[] args)
CompensatingTransactionOperationManagerperformOperation in interface CompensatingTransactionOperationManagerresource - the target resource to perform the operation on.operation - The method to be invoked.args - Arguments supplied to the method.public void rollback()
CompensatingTransactionOperationManagerrollback in interface CompensatingTransactionOperationManagerprotected java.util.Stack getOperationExecutors()
public void commit()
CompensatingTransactionOperationManagercommit in interface CompensatingTransactionOperationManager