public class GlueLazyDataSourceTransactionManager extends GlueDataSourceTransactionManager implements GlueLazyTransactionManager
Bean Property - dataSource : (필수) - transactionDefinition : (선택) 예제사용 예# 1
AbstractPlatformTransactionManager.SuspendedResourcesHolder
SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION
Constructor and Description |
---|
GlueLazyDataSourceTransactionManager() |
Modifier and Type | Method and Description |
---|---|
TransactionStatus |
changeTransaction(TransactionStatus ts)
ThreadLocal의 Transaction Status를 교체한다
|
boolean |
commit()
트랜잭션을 커밋한다.
|
boolean |
lazyCommit() |
boolean |
lazyRollback() |
boolean |
rollback()
트랜잭션을 롤백한다.
|
void |
startTransaction()
트랜잭션을 시작한다.
|
afterPropertiesSet, setTransactionDefinition
doBegin, doCleanupAfterCompletion, doCommit, doGetTransaction, doResume, doRollback, doSetRollbackOnly, doSuspend, getDataSource, getResourceFactory, isEnforceReadOnly, isExistingTransaction, obtainDataSource, prepareTransactionalConnection, setDataSource, setEnforceReadOnly
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commit, getTransaction, rollback
public GlueLazyDataSourceTransactionManager()
public boolean lazyCommit() throws GlueException
lazyCommit
in interface GlueLazyTransactionManager
GlueException
public boolean lazyRollback() throws GlueException
lazyRollback
in interface GlueLazyTransactionManager
GlueException
public void startTransaction() throws GlueException
GlueTransactionManager
startTransaction
메소드를 호출하지 않으면 트랜잭션이 작동하지 않는다.startTransaction
in interface GlueTransactionManager
startTransaction
in class GlueDataSourceTransactionManager
GlueException
- 트랜잭션 시작 실패 시public boolean commit() throws GlueException
GlueTransactionManager
startThreadLocalTransaction
메소드를 호출해 주어야 한다.commit
in interface GlueTransactionManager
commit
in class GlueDataSourceTransactionManager
GlueException
- 트랜잭션 커밋 실패 시public boolean rollback() throws GlueException
GlueTransactionManager
startThreadLocalTransaction
메소드를 호출해 주어야 한다.rollback
in interface GlueTransactionManager
rollback
in class GlueDataSourceTransactionManager
GlueException
- 트랜잭션을 롤백 실패 시public TransactionStatus changeTransaction(TransactionStatus ts) throws GlueException
GlueDataSourceTransactionManager
changeTransaction
in interface GlueTransactionManager
changeTransaction
in class GlueDataSourceTransactionManager
ts
- 새롭게 ThreadLocal에 설정할 TransactionStatusGlueException
Copyright © 2013–2021 POSCO ICT. All rights reserved.