Interface CompensatingTransactionOperationManager
- All Known Implementing Classes:
DefaultCompensatingTransactionOperationManager
public interface CompensatingTransactionOperationManager
A CompensatingTransactionOperationManager implementation records and performs
operations that are to be performed within a compensating transaction. It keeps track
of compensating actions necessary for rolling back each individual operation.
- Since:
- 1.2
-
Method Summary
Modifier and TypeMethodDescriptionvoid
commit()
Commit all recorded operations.void
performOperation
(Object resource, String operation, 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.
-
Method Details
-
performOperation
Indicates that the supplied operation (method name) is to be performed. This method is responsible for recording the current state (prior to the operation), performing the operation, and storing the necessary information to roll back or commit the performed operation.- Parameters:
resource
- the target resource to perform the operation on.operation
- The method to be invoked.args
- Arguments supplied to the method.
-
rollback
void rollback()Rollback all recorded operations by performing each of the recorded rollback operations. -
commit
void commit()Commit all recorded operations. In many cases this means doing nothing, but in some cases some temporary data will need to be removed.
-