org.springframework.ldap.transaction.compensating.manager
Class ContextSourceAndDataSourceTransactionManager
java.lang.Object
org.springframework.transaction.support.AbstractPlatformTransactionManager
org.springframework.jdbc.datasource.DataSourceTransactionManager
org.springframework.ldap.transaction.compensating.manager.ContextSourceAndDataSourceTransactionManager
- All Implemented Interfaces:
- Serializable, InitializingBean, PlatformTransactionManager, ResourceTransactionManager
public class ContextSourceAndDataSourceTransactionManager
- extends DataSourceTransactionManager
A Transaction Manager to manage LDAP and JDBC operations within the same
transaction. Note that even though the same logical transaction is used, this
is not a JTA XA transaction; no two-phase commit will be performed,
and thus commit and rollback may yield unexpected results.
Note that nested transactions are not supported.
- Since:
- 1.2
- Author:
- Mattias Hellborg Arthursson
- See Also:
- Serialized Form
Methods inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager |
commit, determineTimeout, getDefaultTimeout, getTransaction, getTransactionSynchronization, invokeAfterCompletion, isFailEarlyOnGlobalRollbackOnly, isGlobalRollbackOnParticipationFailure, isNestedTransactionAllowed, isRollbackOnCommitFailure, isValidateExistingTransaction, newTransactionStatus, prepareForCommit, prepareSynchronization, prepareTransactionStatus, registerAfterCompletionWithExistingTransaction, resume, rollback, setDefaultTimeout, setFailEarlyOnGlobalRollbackOnly, setGlobalRollbackOnParticipationFailure, setNestedTransactionAllowed, setRollbackOnCommitFailure, setTransactionSynchronization, setTransactionSynchronizationName, setValidateExistingTransaction, shouldCommitOnGlobalRollbackOnly, suspend, triggerBeforeCommit, triggerBeforeCompletion, useSavepointForNestedTransaction |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextSourceAndDataSourceTransactionManager
public ContextSourceAndDataSourceTransactionManager()
isExistingTransaction
protected boolean isExistingTransaction(Object transaction)
- Overrides:
isExistingTransaction
in class DataSourceTransactionManager
doGetTransaction
protected Object doGetTransaction()
throws TransactionException
- Overrides:
doGetTransaction
in class DataSourceTransactionManager
- Throws:
TransactionException
doBegin
protected void doBegin(Object transaction,
TransactionDefinition definition)
throws TransactionException
- Overrides:
doBegin
in class DataSourceTransactionManager
- Throws:
TransactionException
doCleanupAfterCompletion
protected void doCleanupAfterCompletion(Object transaction)
- Overrides:
doCleanupAfterCompletion
in class DataSourceTransactionManager
doCommit
protected void doCommit(DefaultTransactionStatus status)
throws TransactionException
- Overrides:
doCommit
in class DataSourceTransactionManager
- Throws:
TransactionException
doRollback
protected void doRollback(DefaultTransactionStatus status)
throws TransactionException
- Overrides:
doRollback
in class DataSourceTransactionManager
- Throws:
TransactionException
getContextSource
public ContextSource getContextSource()
setContextSource
public void setContextSource(ContextSource contextSource)
setRenamingStrategy
protected void setRenamingStrategy(TempEntryRenamingStrategy renamingStrategy)
doSuspend
protected Object doSuspend(Object transaction)
throws TransactionException
- Overrides:
doSuspend
in class DataSourceTransactionManager
- Throws:
TransactionException
doResume
protected void doResume(Object transaction,
Object suspendedResources)
throws TransactionException
- Overrides:
doResume
in class DataSourceTransactionManager
- Throws:
TransactionException
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Overrides:
afterPropertiesSet
in class DataSourceTransactionManager