com.poscoict.glueframework.transaction
Class GlueLazyDataSourceTransactionManager

java.lang.Object
  extended by org.springframework.transaction.support.AbstractPlatformTransactionManager
      extended by org.springframework.jdbc.datasource.DataSourceTransactionManager
          extended by com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager
              extended by com.poscoict.glueframework.transaction.GlueLazyDataSourceTransactionManager
All Implemented Interfaces:
GlueLazyTransactionManager, GlueTransactionManager, Serializable, InitializingBean, PlatformTransactionManager, ResourceTransactionManager

public class GlueLazyDataSourceTransactionManager
extends GlueDataSourceTransactionManager
implements GlueLazyTransactionManager

GlueLazyTransactionManager ±¸Çöü. ³»ºÎÀûÀ¸·Î Spring Framework¿¡¼­ Á¦°øÇÏ´Â DataSourceTransactionManager¸¦ »ó¼Ó¹Þ´Â´Ù. GlueLazyDataSourceTransactionManager´Â GlueLazyJdbcDao¿Í °°ÀÌ »ç¿ëµÈ´Ù.

 Bean Property
 
 - dataSource : (Çʼö)
 
 - transactionDefinition : (¼±ÅÃ)
 
 
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 
     <bean id="tx" class="com.poscoict.glueframework.transaction.GlueLazyDataSourceTransactionManager">
         <property name="dataSource" ref="dataSource"/>
     </bean>
     <bean id="dao" class="com.poscoict.glueframework.dao.jdbc.GlueLazyJdbcDao">
         <property name="dataSource" ref="dataSource"/>
         <property name="queryManager" ref="queryManager"/>
         <property name="fetchSize" value="100"/>
         <property name="countQuery" value="select count(*) from (${query})"/>
     </bean>
     <bean id="dataSource" class="...">
     </bean>
 

See Also:
GlueLazyTransactionManagerHolder, GlueLazyTransactionReleaseFilter, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager
AbstractPlatformTransactionManager.SuspendedResourcesHolder
 
Field Summary
 
Fields inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager
SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION
 
Constructor Summary
GlueLazyDataSourceTransactionManager()
           
 
Method Summary
 TransactionStatus changeTransaction(TransactionStatus ts)
          ThreadLocalÀÇ Transaction Status¸¦ ±³Ã¼ÇÑ´Ù
 boolean commit()
          Æ®·£Àè¼ÇÀ» Ä¿¹ÔÇÑ´Ù.
 boolean lazyCommit()
           
 boolean lazyRollback()
           
 boolean rollback()
          Æ®·£Àè¼ÇÀ» ·Ñ¹éÇÑ´Ù.
 void startTransaction()
          Æ®·£Àè¼ÇÀ» ½ÃÀÛÇÑ´Ù.
 
Methods inherited from class com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager
afterPropertiesSet, setTransactionDefinition
 
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
 
Methods inherited from interface org.springframework.transaction.PlatformTransactionManager
commit, getTransaction, rollback
 

Constructor Detail

GlueLazyDataSourceTransactionManager

public GlueLazyDataSourceTransactionManager()
Method Detail

lazyCommit

public boolean lazyCommit()
                   throws GlueException
Specified by:
lazyCommit in interface GlueLazyTransactionManager
Throws:
GlueException

lazyRollback

public boolean lazyRollback()
                     throws GlueException
Specified by:
lazyRollback in interface GlueLazyTransactionManager
Throws:
GlueException

startTransaction

public void startTransaction()
                      throws GlueException
Description copied from interface: GlueTransactionManager
Æ®·£Àè¼ÇÀ» ½ÃÀÛÇÑ´Ù. ¸í½ÃÀûÀ¸·Î startTransaction ¸Þ¼Òµå¸¦ È£ÃâÇÏÁö ¾ÊÀ¸¸é Æ®·£Àè¼ÇÀÌ ÀÛµ¿ÇÏÁö ¾Ê´Â´Ù.

Specified by:
startTransaction in interface GlueTransactionManager
Overrides:
startTransaction in class GlueDataSourceTransactionManager
Throws:
GlueException - Æ®·£Àè¼Ç ½ÃÀÛ ½ÇÆÐ ½Ã

commit

public boolean commit()
               throws GlueException
Description copied from interface: GlueTransactionManager
Æ®·£Àè¼ÇÀ» Ä¿¹ÔÇÑ´Ù. Ä¿¹Ô ¼öÇà ÈÄ »õ·Î¿î Æ®·£Àè¼ÇÀ» ½ÃÀÛÇϱâ À§Çؼ­´Â startThreadLocalTransaction ¸Þ¼Òµå¸¦ È£ÃâÇØ ÁÖ¾î¾ß ÇÑ´Ù.

Specified by:
commit in interface GlueTransactionManager
Overrides:
commit in class GlueDataSourceTransactionManager
Returns:
¼º°øÇϸé true
Throws:
GlueException - Æ®·£Àè¼Ç Ä¿¹Ô ½ÇÆÐ ½Ã

rollback

public boolean rollback()
                 throws GlueException
Description copied from interface: GlueTransactionManager
Æ®·£Àè¼ÇÀ» ·Ñ¹éÇÑ´Ù. ·Ñ¹é ¼öÇà ÈÄ »õ·Î¿î Æ®·£Àè¼ÇÀ» ½ÃÀÛÇϱâ À§Çؼ­´Â startThreadLocalTransaction ¸Þ¼Òµå¸¦ È£ÃâÇØ ÁÖ¾î¾ß ÇÑ´Ù.

Specified by:
rollback in interface GlueTransactionManager
Overrides:
rollback in class GlueDataSourceTransactionManager
Returns:
¼º°øÇϸé true
Throws:
GlueException - Æ®·£Àè¼ÇÀ» ·Ñ¹é ½ÇÆÐ ½Ã

changeTransaction

public TransactionStatus changeTransaction(TransactionStatus ts)
                                    throws GlueException
Description copied from class: GlueDataSourceTransactionManager
ThreadLocalÀÇ Transaction Status¸¦ ±³Ã¼ÇÑ´Ù

Specified by:
changeTransaction in interface GlueTransactionManager
Overrides:
changeTransaction in class GlueDataSourceTransactionManager
Returns:
TransactionStatus ±âÁ¸¿¡ »ç¿ëÇÏ°í ÀÖ´ø TransactionStatus
Throws:
GlueException


Copyright © 2013–2017 POSCO ICT. All rights reserved.