Class AbstractCompensatingTransactionManagerDelegate
java.lang.Object
org.springframework.transaction.compensating.support.AbstractCompensatingTransactionManagerDelegate
- Direct Known Subclasses:
ContextSourceTransactionManagerDelegate
Abstract superclass for Compensating TransactionManager delegates. The actual
transaction work is extracted to a delegate to enable composite Transaction Managers.
- Since:
- 1.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
closeTargetResource
(CompensatingTransactionHolderSupport transactionHolderSupport) Close the target resource - the implementation specific resource held in the specifiedCompensatingTransactionHolderSupport
.void
void
doCleanupAfterCompletion
(Object transaction) void
doCommit
(org.springframework.transaction.support.DefaultTransactionStatus status) void
doRollback
(org.springframework.transaction.support.DefaultTransactionStatus status) protected abstract CompensatingTransactionHolderSupport
Get a new implementation specificCompensatingTransactionHolderSupport
instance.protected abstract Object
Get the key (normally, a DataSource or similar) that should be used for transaction synchronization.
-
Constructor Details
-
AbstractCompensatingTransactionManagerDelegate
public AbstractCompensatingTransactionManagerDelegate()
-
-
Method Details
-
closeTargetResource
protected abstract void closeTargetResource(CompensatingTransactionHolderSupport transactionHolderSupport) Close the target resource - the implementation specific resource held in the specifiedCompensatingTransactionHolderSupport
.- Parameters:
transactionHolderSupport
- theCompensatingTransactionHolderSupport
that holds the transaction specific target resource.
-
getNewHolder
Get a new implementation specificCompensatingTransactionHolderSupport
instance.- Returns:
- a new
CompensatingTransactionHolderSupport
instance.
-
getTransactionSynchronizationKey
Get the key (normally, a DataSource or similar) that should be used for transaction synchronization.- Returns:
- the transaction synchronization key
-
doGetTransaction
- Throws:
org.springframework.transaction.TransactionException
-
doBegin
public void doBegin(Object transaction, org.springframework.transaction.TransactionDefinition definition) throws org.springframework.transaction.TransactionException - Throws:
org.springframework.transaction.TransactionException
-
doCommit
public void doCommit(org.springframework.transaction.support.DefaultTransactionStatus status) throws org.springframework.transaction.TransactionException - Throws:
org.springframework.transaction.TransactionException
-
doRollback
public void doRollback(org.springframework.transaction.support.DefaultTransactionStatus status) throws org.springframework.transaction.TransactionException - Throws:
org.springframework.transaction.TransactionException
-
doCleanupAfterCompletion
-