Class ContextSourceTransactionManagerDelegate
java.lang.Object
org.springframework.transaction.compensating.support.AbstractCompensatingTransactionManagerDelegate
org.springframework.ldap.transaction.compensating.manager.ContextSourceTransactionManagerDelegate
public class ContextSourceTransactionManagerDelegate
extends AbstractCompensatingTransactionManagerDelegate
This delegate performs all the work for the
ContextSourceTransactionManager
.
The work is delegated in order to be able to perform the exact same work for the LDAP
part in ContextSourceAndDataSourceTransactionManager
.- Since:
- 1.2
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
closeTargetResource
(CompensatingTransactionHolderSupport transactionHolderSupport) Close the target resource - the implementation specific resource held in the specifiedCompensatingTransactionHolderSupport
.protected CompensatingTransactionHolderSupport
Get a new implementation specificCompensatingTransactionHolderSupport
instance.protected Object
Get the key (normally, a DataSource or similar) that should be used for transaction synchronization.void
setContextSource
(ContextSource contextSource) Set the ContextSource to work on.void
setRenamingStrategy
(TempEntryRenamingStrategy renamingStrategy) Set theTempEntryRenamingStrategy
to be used when renaming temporary entries in unbind and rebind operations.Methods inherited from class org.springframework.transaction.compensating.support.AbstractCompensatingTransactionManagerDelegate
doBegin, doCleanupAfterCompletion, doCommit, doGetTransaction, doRollback
-
Constructor Details
-
ContextSourceTransactionManagerDelegate
public ContextSourceTransactionManagerDelegate()
-
-
Method Details
-
setContextSource
Set the ContextSource to work on. Even though the actual ContextSource sent to the LdapTemplate instance should be aTransactionAwareContextSourceProxy
, the one sent to this method should be the target of that proxy. If it is not, the target will be extracted and used instead.- Parameters:
contextSource
- the ContextSource to work on.
-
getContextSource
-
getTransactionSynchronizationKey
Description copied from class:AbstractCompensatingTransactionManagerDelegate
Get the key (normally, a DataSource or similar) that should be used for transaction synchronization.- Specified by:
getTransactionSynchronizationKey
in classAbstractCompensatingTransactionManagerDelegate
- Returns:
- the transaction synchronization key
-
getNewHolder
Description copied from class:AbstractCompensatingTransactionManagerDelegate
Get a new implementation specificCompensatingTransactionHolderSupport
instance.- Specified by:
getNewHolder
in classAbstractCompensatingTransactionManagerDelegate
- Returns:
- a new
CompensatingTransactionHolderSupport
instance.
-
closeTargetResource
Description copied from class:AbstractCompensatingTransactionManagerDelegate
Close the target resource - the implementation specific resource held in the specifiedCompensatingTransactionHolderSupport
.- Specified by:
closeTargetResource
in classAbstractCompensatingTransactionManagerDelegate
- Parameters:
transactionHolderSupport
- theCompensatingTransactionHolderSupport
that holds the transaction specific target resource.
-
setRenamingStrategy
Set theTempEntryRenamingStrategy
to be used when renaming temporary entries in unbind and rebind operations. Default value is aDefaultTempEntryRenamingStrategy
.- Parameters:
renamingStrategy
- theTempEntryRenamingStrategy
to use.
-