com.poscoict.glueframework.transaction
Class GlueDataSourceTransactionManager
java.lang.Object
org.springframework.transaction.support.AbstractPlatformTransactionManager
org.springframework.jdbc.datasource.DataSourceTransactionManager
com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager
- All Implemented Interfaces:
- GlueTransactionManager, Serializable, InitializingBean, PlatformTransactionManager, ResourceTransactionManager
public class GlueDataSourceTransactionManager
- extends DataSourceTransactionManager
- implements GlueTransactionManager
Data SourceÀÇ Æ®·£Àè¼ÇÀ» °ü¸®ÇÏ´Â Manager Ŭ·¡½ºÀÌ´Ù. ³»ºÎÀûÀ¸·Î Spring Framework¿¡¼ Á¦°øÇÏ´Â DataSourceTransactionManager¸¦ »ó¼Ó¹Þ´Â´Ù.
Bean Property
- dataSource : (Çʼö)
- transactionDefinition : (¼±ÅÃ)
¿¹Á¦
»ç¿ë ¿¹# 1
»ç¿ë ¿¹# 2
- Transaction Definition Ãß°¡
- See Also:
- Serialized Form
Methods inherited from class org.springframework.jdbc.datasource.DataSourceTransactionManager |
doBegin, doCleanupAfterCompletion, doCommit, doGetTransaction, doResume, doRollback, doSetRollbackOnly, doSuspend, getDataSource, getResourceFactory, isExistingTransaction, setDataSource |
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 |
GlueDataSourceTransactionManager
public GlueDataSourceTransactionManager()
setTransactionDefinition
public void setTransactionDefinition(TransactionDefinition def)
- setter method for DI. Transaction DefinitionÀ» ¼³Á¤ÇÑ´Ù.
- Parameters:
def
- Transaction Definition
startTransaction
public void startTransaction()
throws GlueException
- Description copied from interface:
GlueTransactionManager
- Æ®·£Àè¼ÇÀ» ½ÃÀÛÇÑ´Ù. ¸í½ÃÀûÀ¸·Î
startTransaction
¸Þ¼Òµå¸¦ È£ÃâÇÏÁö ¾ÊÀ¸¸é Æ®·£Àè¼ÇÀÌ ÀÛµ¿ÇÏÁö ¾Ê´Â´Ù.
- Specified by:
startTransaction
in interface GlueTransactionManager
- Throws:
GlueException
- Æ®·£Àè¼Ç ½ÃÀÛ ½ÇÆÐ ½Ã
commit
public boolean commit()
throws GlueException
- Description copied from interface:
GlueTransactionManager
- Æ®·£Àè¼ÇÀ» Ä¿¹ÔÇÑ´Ù. Ä¿¹Ô ¼öÇà ÈÄ »õ·Î¿î Æ®·£Àè¼ÇÀ» ½ÃÀÛÇϱâ À§Çؼ´Â
startThreadLocalTransaction
¸Þ¼Òµå¸¦ È£ÃâÇØ ÁÖ¾î¾ß ÇÑ´Ù.
- Specified by:
commit
in interface GlueTransactionManager
- Returns:
- ¼º°øÇϸé true
- Throws:
GlueException
- Æ®·£Àè¼Ç Ä¿¹Ô ½ÇÆÐ ½Ã
rollback
public boolean rollback()
throws GlueException
- Description copied from interface:
GlueTransactionManager
- Æ®·£Àè¼ÇÀ» ·Ñ¹éÇÑ´Ù. ·Ñ¹é ¼öÇà ÈÄ »õ·Î¿î Æ®·£Àè¼ÇÀ» ½ÃÀÛÇϱâ À§Çؼ´Â
startThreadLocalTransaction
¸Þ¼Òµå¸¦ È£ÃâÇØ ÁÖ¾î¾ß ÇÑ´Ù.
- Specified by:
rollback
in interface GlueTransactionManager
- Returns:
- ¼º°øÇϸé true
- Throws:
GlueException
- Æ®·£Àè¼ÇÀ» ·Ñ¹é ½ÇÆÐ ½Ã
changeTransaction
public TransactionStatus changeTransaction(TransactionStatus ts)
throws GlueException
- ThreadLocalÀÇ Transaction Status¸¦ ±³Ã¼ÇÑ´Ù
- Specified by:
changeTransaction
in interface GlueTransactionManager
- Parameters:
TransactionStatus
- »õ·Ó°Ô ThreadLocal¿¡ ¼³Á¤ÇÒ TransactionStatus
- Returns:
- TransactionStatus ±âÁ¸¿¡ »ç¿ëÇÏ°í ÀÖ´ø TransactionStatus
- Throws:
GlueException
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Overrides:
afterPropertiesSet
in class DataSourceTransactionManager
Copyright © 2013–2016 POSCO ICT. All rights reserved.