com.poscoict.glueframework.biz.activity
Class GlueSubService

java.lang.Object
  extended by com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
      extended by com.poscoict.glueframework.biz.activity.GlueSubService

public class GlueSubService
extends GlueActivity<GlueContext>

SubService Acitivity. GlueSubService Class´Â Sub Service¸¦ È£ÃâÇÏ¿© ½ÇÇà ÇÑ´Ù.

 Activity Property
 
 - service-name : (Çʼö) ½ÇÇàÇÏ°íÀÚ ÇÏ´Â GlueService.
 
 - new-transaction : (¼±ÅÃ) true, false.
                   ½ÇÇàÇÏ°íÀÚ ÇÏ´Â GlueService¿¡¼­ÀÇ transaction-manager »ç¿ë ¿©ºÎ.
                   true ÀÏ °æ¿ì ÇØ´ç activity´Â success¿Í failure transitionÀ» µÑ´Ù ÇÊ¿ä·Î ÇÔ.
                   true ÀÏ °æ¿ì ½ÇÇàÇÏ°íÀÚ ÇÏ´Â GlueServiceÀÇ transaction-manager(GlueTransactionManager) ÀÇ changeTransaction() ÀÌ ½ÇÇàµÊ. 
                   default ´Â falseÀÓ.
 
 - new-thread-join : (¼±ÅÃ) true, false.
                   ½ÇÇàÇÏ°íÀÚ ÇÏ´Â GlueService¸¦ º°µµÀÇ User Thread·Î ºÐ¸®Çؼ­, User Thread°¡ Á¾·áµÉ¶§±îÁö ±â´Ù¸±Áö ¿©ºÎ.
                   new-transaction property¿Í °°ÀÌ »ç¿ëÇÒ ¼ö ¾øÀ½.
                   ½ÇÇàÇÏ°íÀÚ ÇÏ´Â GlueServiceÀÇ ½ÇÇà °á°ú¿Í ¹«°üÇÏ°Ô ´ÙÀ½ transitionÀº successÀÓ.
 
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 
     <activity name="CallSubController" class="com.poscoict.glueframework.biz.activity.GlueSubService">
         <property name="service-name" value="sub-service"/>
         <transition name="success" value="BizLogic"/>
     </activity>
 
 
 »ç¿ë ¿¹# 2
 
     <activity name="CallSubController" class="com.poscoict.glueframework.biz.activity.GlueSubService">
         <property name="service-name" value="sub-service"/>
         <property name="new-transaction" value="true"/>
         <transition name="success" value="BizLogicSuccess"/>
         <transition name="failure" value="BizLogicFailure"/>
     </activity>
 
 
 »ç¿ë ¿¹# 3
 
     <activity name="CallSubController" class="com.poscoict.glueframework.biz.activity.GlueSubService">
         <property name="service-name" value="sub-service"/>
         <property name="new-thread-join" value="true"/>
         <transition name="success" value="BizLogicSuccess"/>
         <transition name="failure" value="BizLogicFailure"/>
     </activity>
 
 
 
 
 Âü°í : applicationContext.xml ÀϺÎ
 
     <beans ...>
         <bean id="dao-1" class="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao">
             <property name="dataSource" ref="ds-1"/>
             ...
         </bean>
         <bean id="tx-1" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager">
             <property name="dataSource" ref="ds-1"/>
         </bean>
         <bean id="ds-1" .../>
         <bean id="dao-2" class="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao">
             <property name="dataSource" ref="ds-2"/>
             ...
         </bean>
         <bean id="tx-2" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager">
             <property name="dataSource" ref="ds-2"/>
         </bean>
         <bean id="ds-2" .../>
         ...
     </beans>
 
 
 Âü°í : main-service.xml ÀϺÎ
 
     <service ...>
         <transaction-manager id="tx-1" commit="true"/>
         ...
     </service>
 
 
 Âü°í : sub-service.xml ÀϺÎ
 
     <service ...>
         <transaction-manager id="tx-2" commit="true"/>
         ...
     </service>
 
 


Nested Class Summary
protected  class GlueSubService.GlueUserThread
           
 
Field Summary
 
Fields inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
dynamicProperties, logger
 
Constructor Summary
GlueSubService()
           
 
Method Summary
 String runActivity(GlueContext ctx)
          GlueService¸¦ ½ÇÇàÇÑ´Ù.
 
Methods inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
commitTransaction, commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, rollbackTransaction, setEventList, setName, setProperty, setTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueSubService

public GlueSubService()
Method Detail

runActivity

public String runActivity(GlueContext ctx)
GlueService¸¦ ½ÇÇàÇÑ´Ù.
»õ·Î¿î Thread¿¡¼­ GlueService¸¦ ½ÇÇàÇÒ ¼öµµ ÀÖÀ¸¸ç, ÇöÀç Thread¿¡¼­ GlueService¸¦ ½ÇÇàÇÒ ¼öµµ ÀÖ´Ù.
ÇöÀç Thread¿¡¼­ GlueService¸¦ ½ÇÇàÇÒ °æ¿ì, GlueBizController ÀÇ doSubController() °¡ »ç¿ëµÇ¸ç, GlueContext°¡ °øÀ¯µÈ´Ù.
»õ·Î¿î Thread¿¡¼­ GlueServic¸¦ ½ÇÇàÇÒ °æ¿ì, GlueBizController ÀÇ doAction() ÀÌ »ç¿ëµÇ¸ç, GlueContext¸¦ »õ·Î »ý¼º(º¹Á¦)ÇÑ´Ù.

Specified by:
runActivity in class GlueActivity<GlueContext>
Parameters:
ctx - GlueContext
Returns:
String Transition Name


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