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

java.lang.Object
  extended by org.springframework.transaction.support.ResourceHolderSupport
      extended by org.springframework.transaction.compensating.support.CompensatingTransactionHolderSupport
          extended by org.springframework.ldap.transaction.compensating.manager.DirContextHolder

public class DirContextHolder
extends CompensatingTransactionHolderSupport

Keeps track of the transaction DirContext. The same DirContext instance will be reused throughout a transaction. Also keeps a CompensatingTransactionOperationManager, responsible for performing operations and keeping track of all changes and storing information necessary for commit or rollback.

Since:
1.2
Author:
Mattias Arthursson

Constructor Summary
DirContextHolder(CompensatingTransactionOperationManager manager, javax.naming.directory.DirContext ctx)
          Constructor.
 
Method Summary
 javax.naming.directory.DirContext getCtx()
          Return the DirContext associated with the current transaction.
protected  java.lang.Object getTransactedResource()
          Get the actual transacted resource.
 void setCtx(javax.naming.directory.DirContext ctx)
          Set the DirContext associated with the current transaction.
 
Methods inherited from class org.springframework.transaction.compensating.support.CompensatingTransactionHolderSupport
clear, getTransactionOperationManager, setTransactionOperationManager
 
Methods inherited from class org.springframework.transaction.support.ResourceHolderSupport
getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirContextHolder

public DirContextHolder(CompensatingTransactionOperationManager manager,
                        javax.naming.directory.DirContext ctx)
Constructor.

Parameters:
manager - The CompensatingTransactionOperationManager.
ctx - The DirContext associated with the current transaction.
Method Detail

setCtx

public void setCtx(javax.naming.directory.DirContext ctx)
Set the DirContext associated with the current transaction.

Parameters:
ctx - The DirContext associated with the current transaction.

getCtx

public javax.naming.directory.DirContext getCtx()
Return the DirContext associated with the current transaction.


getTransactedResource

protected java.lang.Object getTransactedResource()
Description copied from class: CompensatingTransactionHolderSupport
Get the actual transacted resource.

Specified by:
getTransactedResource in class CompensatingTransactionHolderSupport
Returns:
the transaction's target resource


Copyright � 2002-2006. All Rights Reserved.