Spring LDAP

org.springframework.ldap.transaction.compensating.manager
Class ContextSourceTransactionManagerDelegate

java.lang.Object
  extended by org.springframework.transaction.compensating.support.AbstractCompensatingTransactionManagerDelegate
      extended by 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
Author:
Mattias Hellborg Arthursson
See Also:
ContextSourceTransactionManager, ContextSourceAndDataSourceTransactionManager

Constructor Summary
ContextSourceTransactionManagerDelegate()
           
 
Method Summary
protected  void closeTargetResource(CompensatingTransactionHolderSupport transactionHolderSupport)
          Close the target resource - the implementation specific resource held in the specified CompensatingTransactionHolderSupport.
 ContextSource getContextSource()
           
protected  CompensatingTransactionHolderSupport getNewHolder()
          Get a new implementation specific CompensatingTransactionHolderSupport instance.
protected  Object getTransactionSynchronizationKey()
          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 the TempEntryRenamingStrategy 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextSourceTransactionManagerDelegate

public ContextSourceTransactionManagerDelegate()
Method Detail

setContextSource

public void setContextSource(ContextSource contextSource)
Set the ContextSource to work on. Even though the actual ContextSource sent to the LdapTemplate instance should be a TransactionAwareContextSourceProxy, 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

public ContextSource getContextSource()

getTransactionSynchronizationKey

protected Object 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 class AbstractCompensatingTransactionManagerDelegate
Returns:
the transaction synchronization key

getNewHolder

protected CompensatingTransactionHolderSupport getNewHolder()
Description copied from class: AbstractCompensatingTransactionManagerDelegate
Get a new implementation specific CompensatingTransactionHolderSupport instance.

Specified by:
getNewHolder in class AbstractCompensatingTransactionManagerDelegate
Returns:
a new CompensatingTransactionHolderSupport instance.

closeTargetResource

protected void closeTargetResource(CompensatingTransactionHolderSupport transactionHolderSupport)
Description copied from class: AbstractCompensatingTransactionManagerDelegate
Close the target resource - the implementation specific resource held in the specified CompensatingTransactionHolderSupport.

Specified by:
closeTargetResource in class AbstractCompensatingTransactionManagerDelegate
Parameters:
transactionHolderSupport - the CompensatingTransactionHolderSupport that holds the transaction specific target resource.

setRenamingStrategy

public void setRenamingStrategy(TempEntryRenamingStrategy renamingStrategy)
Set the TempEntryRenamingStrategy to be used when renaming temporary entries in unbind and rebind operations. Default value is a DefaultTempEntryRenamingStrategy.

Parameters:
renamingStrategy - the TempEntryRenamingStrategy to use.

Spring LDAP