public class GlueLazyDataSourceTransactionManager extends GlueDataSourceTransactionManager implements GlueLazyTransactionManager
Bean Property - dataSource : (필수) - transactionDefinition : (선택) 예제사용 예# 1
Constructor and Description |
---|
GlueLazyDataSourceTransactionManager() |
Modifier and Type | Method and Description |
---|---|
org.springframework.transaction.TransactionStatus |
changeTransaction(org.springframework.transaction.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, translateException
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
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 org.springframework.transaction.TransactionStatus changeTransaction(org.springframework.transaction.TransactionStatus ts) throws GlueException
GlueDataSourceTransactionManager
changeTransaction
in interface GlueTransactionManager
changeTransaction
in class GlueDataSourceTransactionManager
ts
- 새롭게 ThreadLocal에 설정할 TransactionStatusGlueException
Copyright © 2023–2024 POSCO DX. All rights reserved.