com.poscoict.glueframework.transaction
Class GlueDefaultTransactionDefinition

java.lang.Object
  extended by org.springframework.transaction.support.DefaultTransactionDefinition
      extended by com.poscoict.glueframework.transaction.GlueDefaultTransactionDefinition
All Implemented Interfaces:
Serializable, org.springframework.transaction.TransactionDefinition

public class GlueDefaultTransactionDefinition
extends org.springframework.transaction.support.DefaultTransactionDefinition

TransactionDefinition ÀÎÅÍÆäÀ̽ºÀÇ µðÆúÆ® ±¸Çö Ŭ·¡½º. µðÆúÆ®·Î ¼³Á¤µÇ´Â Æ®·£Àè¼Ç ÇÁ·ÎÆÛƼ °ª (PROPAGATION_REQUIRES_NEW, ISOLATION_DEFAULT, TIMEOUT_DEFAULT, readOnly=false). org.springframework.transaction.support. DefaultTransactionDefinitionÀ» È®ÀåÇÑ°ÍÀ¸·Î propagationBehaviorÀÇ default °ªÀÌ PROPAGATION_REQUIRED°¡ ¾Æ´Ñ PROPAGATION_REQUIRES_NEWÀÌ¸ç ±×¿Ü´Â µ¿ÀÏÇÏ´Ù.
ºó ½ºÅ¸ÀÏÀÇ ¼³Á¤À» Áö¿øÇÑ´Ù. (Dependency Injection)

µðÆúÆ®·Î Á¦°øµÇ´Â °ªÀ» ¼öÁ¤Çϱâ À§Çؼ­´Â ´ÙÀ½°ú °°ÀÌ applicationContext.xml ÆÄÀÏÀ» ¼öÁ¤ÇÑ´Ù.

 <!-- Transaction Manager -->
 <bean id="tx-1" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager">
     <property name="dataSource"><ref local="ds-1"/></property>
     <property name="transactionDefinition"><ref local="txDef-1"/></property>
 </bean>
 <!-- Transaction Definition -->
 <bean id="txDef-1" class="com.poscoict.glueframework.transaction.GlueDefaultTransactionDefinition">
     <property name="isolationLevelName" value="ISOLATION_READ_COMMITTED"/>
     <property name="propagationBehaviorName" value="PROPAGATION_REQUIRED"/>
     <property name="readOnly" value="false"/>
     <property name="timeout" value="5000"/>
 </bean>
 
timeoutÀº JDBCÀÇ Statement.setQueryTimeout(ÃÊ) ¼³Á¤ÀÔ´Ï´Ù. µðÆúÆ®´Â "-1"ÀÔ´Ï´Ù. "-1"ÀÌ¸é ¹«ÇÑ WaitingÀÌ°í Ç÷¯½º ¼ýÀÚ´Â ÇØ´ç Ãʸ¸Å­ Query¸¦ Waiting ÇÕ´Ï´Ù. JDBC¸¦ °ø±ÞÇÏ´Â º¥´õ¿Í ¹öÁ¯¿¡ µû¶ó µ¿ÀÛÇÒ ¼öµµ ¾ÈÇÒ ¼öµµ ÀÖ½À´Ï´Ù.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.transaction.support.DefaultTransactionDefinition
PREFIX_ISOLATION, PREFIX_PROPAGATION, PREFIX_TIMEOUT, READ_ONLY_MARKER
 
Fields inherited from interface org.springframework.transaction.TransactionDefinition
ISOLATION_DEFAULT, ISOLATION_READ_COMMITTED, ISOLATION_READ_UNCOMMITTED, ISOLATION_REPEATABLE_READ, ISOLATION_SERIALIZABLE, PROPAGATION_MANDATORY, PROPAGATION_NESTED, PROPAGATION_NEVER, PROPAGATION_NOT_SUPPORTED, PROPAGATION_REQUIRED, PROPAGATION_REQUIRES_NEW, PROPAGATION_SUPPORTS, TIMEOUT_DEFAULT
 
Constructor Summary
GlueDefaultTransactionDefinition()
          »ý¼ºÀÚ(constructor).
GlueDefaultTransactionDefinition(org.springframework.transaction.TransactionDefinition txDef)
          »ý¼ºÀÚ(constructor).
 
Method Summary
 
Methods inherited from class org.springframework.transaction.support.DefaultTransactionDefinition
equals, getDefinitionDescription, getIsolationLevel, getName, getPropagationBehavior, getTimeout, hashCode, isReadOnly, setIsolationLevel, setIsolationLevelName, setName, setPropagationBehavior, setPropagationBehaviorName, setReadOnly, setTimeout, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlueDefaultTransactionDefinition

public GlueDefaultTransactionDefinition()
»ý¼ºÀÚ(constructor). DefaultTransactionDefinitionÀÇ °ª¿¡¼­ PropagationBehaviorÀÇ ±âº»°ªÀº PROPAGATION_REQUIRED ´ë½Å¿¡ PROPAGATION_REQUIRES_NEWÀ» ¼³Á¤ÇÑ´Ù. Áï PROPAGATION_REQUIRES_NEW, ISOLATION_DEFAULT, TIMEOUT_DEFAULT, readOnly=false ÀÌ´Ù. ¹°·Ð, setter method¸¦ ÅëÇÑ °ªÀÇ º¯°æÀÌ °¡´ÉÇÏ´Ù.


GlueDefaultTransactionDefinition

public GlueDefaultTransactionDefinition(org.springframework.transaction.TransactionDefinition txDef)
»ý¼ºÀÚ(constructor). º¹»ç »ý¼ºÀÚ

Parameters:
txDef - TransactionDefinition ¿ÀºêÁ§Æ®


Copyright © 2013–2014 POSCO ICT SWÁ¦Ç°±â¼úÆÀ. All rights reserved.