com.poscoict.glueframework.biz.control
Interface GlueBizController

All Known Implementing Classes:
GlueBizControllerImpl

public interface GlueBizController

BizController ÀÎÅÍÆäÀ̽º.
GlueBizController´Â Web,Non Web App °øÅëÀ¸·Î »ç¿ëµÇ¸ç Transactionó¸® ¹× LoggingÀ» ó¸® ÇÏ°í ¼öÇà °á°ú´Â GlueContext¿¡ ¹Ý¿µÇÑ´Ù.

 [sample java code]
 
 GlueContext ctx = new GlueDefaultContext();
 ctx.put("ServiceName", "sample-service");
 GlueBizController bizController = GlueBizProvider.getController();
 bizController.doAction(ctx);
 
 


Method Summary
 GlueContext doAction(GlueContext ctx)
          TransactionÀ» ó¸®¿Í LoggingÀ» ó¸® ÇÏ°í Service¸¦ ½ÇÇà ÇÑ´Ù.
 GlueContext doSubController(GlueContext ctx, boolean newTx)
          doAction()°ú µ¿ÀÏÇÏÁö¸¸ Transaction 󸮴 Á¤ÀÇ¿¡ µû¶ó ´Þ¶óÁø´Ù.
 

Method Detail

doAction

GlueContext doAction(GlueContext ctx)
TransactionÀ» ó¸®¿Í LoggingÀ» ó¸® ÇÏ°í Service¸¦ ½ÇÇà ÇÑ´Ù.
TransactionÀº {xxx}-service.xml ¿¡ ´ÙÀ½°ú °°ÀÌ Á¤ÀÇ µÈ´Ù.
 <transaction-manager id="tx1" commit="true"/>
 <transaction-manager id="tx2" commit="false"/>
 
 À§ÀÇ Transaction List ¸¸Å­ Commit ¹× RollbackÀ» ¼öÇàÇÏ°í
 ¸¸ÀÏ commit="false"À̸é CommitÀ» ¼öÇàÇÏÁö ¾Ê´Â´Ù.
 commit="false" ¸¦ »ç¿ëÇÏ´Â °æ¿ì¿¡´Â Read Only °æ¿ì¿¡ »ç¿ëµÈ´Ù.
 ½ÇÁ¦ TransactionÀÇ Á¤ÀÇ´Â applicationContext.xml¿¡ ´ÙÀ½°ú °°ÀÌ Á¤ÀÇ µÈ´Ù.
 
 <bean id="tx1" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager">
     <property name="dataSource" ref="ds-1"/> 
 </bean>
 <bean id="tx2" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager">
     <property name="dataSource" ref="ds-2"/>
 </bean>
 

Parameters:
ctx - GlueContext
Returns:
GlueContext °á°ú °ª Return

doSubController

GlueContext doSubController(GlueContext ctx,
                            boolean newTx)
doAction()°ú µ¿ÀÏÇÏÁö¸¸ Transaction 󸮴 Á¤ÀÇ¿¡ µû¶ó ´Þ¶óÁø´Ù.
 <activity name="CallSubController" class="com.poscoict.glueframework.biz.activity.GlueSubService">
     <transition name="success" value="HandleError"/>
     <property name="service-name" value="Sub-service"/>
     <property name="new-transacion" value="true"/>
 </activity>
 
 Sub-service ¸¦ È£Ãâ ÇÏ´Â À§ ¿¹Á¦¿¡¼­ "<property name="new-transacion" value="true"/>" ÀÎ °æ¿ì
 Main-service ÀÇ Transaction°ú º°°³·Î SubService¿¡ Á¤ÀǵǾî ÀÖ´Â TransactionÀ» ó¸®ÇÏ°Ô µÈ´Ù.
 "fale"À̸é Transaction 󸮸¦ ÇÏÁö ¾Ê´Â´Ù. Áï MainServiceÀÇ TransactionÀ» ÀÌ¿ëÇÏ°Ô µÈ´Ù.
 
 

Parameters:
ctx - GlueContext
newTx -
Returns:
GlueContext °á°ú °ª Return


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