Class DirContextHolder
java.lang.Object
org.springframework.transaction.support.ResourceHolderSupport
org.springframework.transaction.compensating.support.CompensatingTransactionHolderSupport
org.springframework.ldap.transaction.compensating.manager.DirContextHolder
- All Implemented Interfaces:
org.springframework.transaction.support.ResourceHolder
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
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor. -
Method Summary
Modifier and TypeMethodDescriptiongetCtx()Return the DirContext associated with the current transaction.protected ObjectGet the actual transacted resource.voidsetCtx(DirContext ctx) Set the DirContext associated with the current transaction.Methods inherited from class CompensatingTransactionHolderSupport
clear, getTransactionOperationManager, setTransactionOperationManagerMethods inherited from class org.springframework.transaction.support.ResourceHolderSupport
getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, resetRollbackOnly, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound
-
Constructor Details
-
DirContextHolder
Constructor.- Parameters:
manager- TheCompensatingTransactionOperationManager.ctx- The DirContext associated with the current transaction.
-
-
Method Details
-
setCtx
Set the DirContext associated with the current transaction.- Parameters:
ctx- The DirContext associated with the current transaction.
-
getCtx
Return the DirContext associated with the current transaction. -
getTransactedResource
Description copied from class:CompensatingTransactionHolderSupportGet the actual transacted resource.- Specified by:
getTransactedResourcein classCompensatingTransactionHolderSupport- Returns:
- the transaction's target resource
-