Class ContextSourceAndHibernateTransactionManager
- java.lang.Object
-
- org.springframework.transaction.support.AbstractPlatformTransactionManager
-
- org.springframework.orm.hibernate5.HibernateTransactionManager
-
- org.springframework.ldap.transaction.compensating.manager.ContextSourceAndHibernateTransactionManager
-
- All Implemented Interfaces:
java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.InitializingBean,org.springframework.transaction.PlatformTransactionManager,org.springframework.transaction.support.ResourceTransactionManager,org.springframework.transaction.TransactionManager
public class ContextSourceAndHibernateTransactionManager extends org.springframework.orm.hibernate5.HibernateTransactionManagerDeprecated.The idea of wrapping two transaction managers without actual XA support is probably not such a good idea after all. AbstractPlatformTransactionManager is not designed for this usage.A Transaction Manager to manage LDAP and Hibernate 3 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.
This Transaction Manager is as good as it gets when you are using in LDAP in combination with a Hibernate 3 and unable to use XA transactions because LDAP is not transactional by design to begin with.
Furthermore, this manager does not support nested transactions- Since:
- 1.2.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContextSourceAndHibernateTransactionManager()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()Deprecated.protected voiddoBegin(java.lang.Object transaction, org.springframework.transaction.TransactionDefinition definition)Deprecated.protected voiddoCleanupAfterCompletion(java.lang.Object transaction)Deprecated.protected voiddoCommit(org.springframework.transaction.support.DefaultTransactionStatus status)Deprecated.protected java.lang.ObjectdoGetTransaction()Deprecated.protected voiddoResume(java.lang.Object transaction, java.lang.Object suspendedResources)Deprecated.protected voiddoRollback(org.springframework.transaction.support.DefaultTransactionStatus status)Deprecated.protected java.lang.ObjectdoSuspend(java.lang.Object transaction)Deprecated.ContextSourcegetContextSource()Deprecated.protected booleanisExistingTransaction(java.lang.Object transaction)Deprecated.voidsetContextSource(ContextSource contextSource)Deprecated.voidsetRenamingStrategy(TempEntryRenamingStrategy renamingStrategy)Deprecated.-
Methods inherited from class org.springframework.orm.hibernate5.HibernateTransactionManager
convertHibernateAccessException, disconnectOnCompletion, doSetRollbackOnly, getDataSource, getEntityInterceptor, getResourceFactory, getSessionFactory, obtainSessionFactory, setAllowResultAccessAfterCompletion, setAutodetectDataSource, setBeanFactory, setDataSource, setEntityInterceptor, setEntityInterceptorBeanName, setHibernateManagedSession, setPrepareConnection, setSessionFactory, setSessionInitializer
-
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
-
-
-
-
Method Detail
-
isExistingTransaction
protected boolean isExistingTransaction(java.lang.Object transaction)
Deprecated.- Overrides:
isExistingTransactionin classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
doGetTransaction
protected java.lang.Object doGetTransaction()
Deprecated.- Overrides:
doGetTransactionin classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
doBegin
protected void doBegin(java.lang.Object transaction, org.springframework.transaction.TransactionDefinition definition)Deprecated.- Overrides:
doBeginin classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
doCleanupAfterCompletion
protected void doCleanupAfterCompletion(java.lang.Object transaction)
Deprecated.- Overrides:
doCleanupAfterCompletionin classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
doCommit
protected void doCommit(org.springframework.transaction.support.DefaultTransactionStatus status)
Deprecated.- Overrides:
doCommitin classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
doRollback
protected void doRollback(org.springframework.transaction.support.DefaultTransactionStatus status)
Deprecated.- Overrides:
doRollbackin classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
getContextSource
public ContextSource getContextSource()
Deprecated.
-
setContextSource
public void setContextSource(ContextSource contextSource)
Deprecated.
-
setRenamingStrategy
public void setRenamingStrategy(TempEntryRenamingStrategy renamingStrategy)
Deprecated.
-
doSuspend
protected java.lang.Object doSuspend(java.lang.Object transaction)
Deprecated.- Overrides:
doSuspendin classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
doResume
protected void doResume(java.lang.Object transaction, java.lang.Object suspendedResources)Deprecated.- Overrides:
doResumein classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
afterPropertiesSet
public void afterPropertiesSet()
Deprecated.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classorg.springframework.orm.hibernate5.HibernateTransactionManager
-
-