SubService activity는 GlueService를 재사용 할 수 있는 기능을 제공하는 activity입니다.
SubService가 사용된 GlueService의 depth를 n 이라고 한다면,
SubService에 의해 실행되는 GlueService의 depth는 n+1 이라고 합니다.
SubService activity의 Property는 다음과 같습니다.
service-name : (필수) 실행하고자 하는 GlueService.
new-transaction : (선택) 실행하고자 하는 GlueService에서의 TransactionManager 사용 여부(DB Transaction 분리여부).
default는 false 입니다.
true 일경우 SubService Activity는 success와 failure transition을 둘다 필요로 합니다.
new-transaction 과 new-thread-join 은 같이 사용할 수 없습니다.
시나리오 #1, 시나리오 #2, 시나리오 #3 를 따릅니다.
new-thread-join : (선택) 실행하고자 하는 GlueService를 별도의 User Thread로 분리해서, User Thread가 종료될 때까지 기다릴지 여부.
new-transaction 과 new-thread-join 은 같이 사용할 수 없습니다. TransactionManager는 동일 Java Thread에서 수행된 DML에 대해서만 관리하므로, new-thread-join property로 인해 User Thread로 분리되는 경우, DB Lock을 유발하지 않도록 하여야 합니다.
시나리오 #4 를 참고합니다.
GlueService에서 TransactionManager와 DAO를 사용하지 않는 경우로 권고사항은 다음과 같습니다.
DB 사용이 없는 경우 SubService activity의 new-transaction property를 생략하거나 그 값은 false를 사용합니다.
다음은 Control Layer에서 호출되는 GlueService에서 SubService를 사용하는 경우입니다.
<?xml version="1.0" encoding="UTF-8"?> <service name="biz-main-service" initial="SubService[biz-sub1-service]" xmlns="http://www.poscoict.com/glueframework/service"> <activity name="SubService[biz-sub1-service]" class="com.poscoict.glueframework.biz.activity.GlueSubService"> <transition name="success" value="SubService[biz-sub2-service]"/> <property name="service-name" value="biz-sub1-service"/> </activity> <activity name="SubService[biz-sub2-service]" class="com.poscoict.glueframework.biz.activity.GlueSubService"> <transition name="success" value="SubService[biz-sub3-service]"/> <property name="service-name" value="biz-sub2-service"/> </activity> <activity name="SubService[biz-sub3-service]" class="com.poscoict.glueframework.biz.activity.GlueSubService"> <transition name="success" value="end"/> <property name="service-name" value="biz-sub3-service"/> </activity> </service>
다음은 Control Layer에서 호출되는 GlueService에서 SubService를 사용하였고, depth 2 의 GlueService에서도 SubService 를 사용한 경우 입니다.
<?xml version="1.0" encoding="UTF-8"?> <service name="biz-m2-service" initial="SubService[biz-s1-service]" xmlns="http://www.poscoict.com/glueframework/service"> <activity name="SubService[biz-s1-service]" class="com.poscoict.glueframework.biz.activity.GlueSubService"> <transition name="success" value="BizLogic#1"/> <property name="service-name" value="biz-s1-service"/> </activity> <activity name="BizLogic#1" . . .> </service>
<?xml version="1.0" encoding="UTF-8"?> <service name="biz-s1-service" initial="BizLogic#2" xmlns="http://www.poscoict.com/glueframework/service"> <activity name="BizLogic#2" . . .> <activity name="SubService[biz-s2-service]" class="com.poscoict.glueframework.biz.activity.GlueSubService"> <transition name="success" value="end"/> <property name="service-name" value="biz-s2-service"/> </activity> </service>
<?xml version="1.0" encoding="UTF-8"?> <service name="biz-s2-service" initial="BizLogic#4" xmlns="http://www.poscoict.com/glueframework/service"> <activity name="BizLogic#4" . . .> <activity name="SubService[biz-s3-service]" class="com.poscoict.glueframework.biz.activity.GlueSubService"> <transition name="success" value="end"/> <property name="service-name" value="biz-s3-service"/> </activity> <activity name="BizLogic#5" . . .> </service>
depth 1부터 depth n까지의 GlueService에서 사용하는 DB연결정보가 하나인 경우입니다.
즉, GlueService에서 사용하는 DAO와 Transaction Manager 가 1개의 DB 연결정보와 함께 한 세트인 경우 입니다.
다음은 biz-dataSource :: biz-tx :: biz-dao 가 한 세트인 applicationContext.xml 예제입니다. (dataSource의 autoCommit값은 false 입니다)
<beans ...> ... <bean id="biz-dao" class="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao"> <property name="dataSource" ref="biz-dataSource"/> <property name="queryManager" ref= ... /> </bean> <bean id="biz-tx" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager"> <property name="dataSource" ref="biz-dataSource"/> </bean> <bean id="biz-dataSource" class= ... /> ... </beans>
이 경우의 권고사항은 다음과 같습니다.
DAO를 사용하는 모든 GlueService에 transaction-manager 를 설정합니다.
특히 depth 1 에 속하는 GlueService에는 transaction-manager 를 항상 설정합니다.
<service ...> <transaction-manager id="biz-tx" commit="true"/> <activity .../> ... </service>
예외> depth 1 에 속하는 GlueService에서 DAO를 사용하지 않을 경우, transaction-manager 를 설정하지 않을 수 있습니다.
SubService activity의 new-transaction property의 값은 false를 사용합니다.
<service ...> ... <activity ... class="com.poscoict.glueframework.biz.activity.GlueSubService"> ... <property name="new-transaction" value="false"/> ... </activity> ... </service>
예외> SubService activity가 속한 GlueService(depth n)에 transaction-manager 가 설정되어 있지 않고,
SubService activity에 의해 실행되는 GlueService(depth n+1)에서 DAO를 사용한다면, new-transaction property의 값은 true 를 사용합니다.
예외> 다른 depth 의 GlueService 간에 transaction을 분리하고자 하는 경우 new-transaction property의 값은 true를 사용할 수 있습니다.
다음은 권고사항에 따른 시나리오 입니다.
depth | ServiceName | ActivityName | DML | - |
---|---|---|---|---|
1 | biz-main-service | CRUD#1 | insert into emp(empno, ename, sal, deptno) values('1111', 'test-1', '1000', '40') | SQL#1 |
2 | biz-sub1-service | CRUD#4 | insert into emp(empno, ename, sal, deptno) values('1114', 'test-4', '1000', '40') | SQL#2 |
1 | biz-main-service | CRUD#2 | insert into emp(empno, ename, sal, deptno) values('1112', 'test-2', '1000', '40') | SQL#3 |
2 | biz-sub2-service | CRUD#5 | insert into emp(empno, ename, sal, deptno) values('1115', 'test-5', '1000', '40') | SQL#4 |
1 | biz-main-service | CRUD#3 | insert into emp(empno, ename, sal, deptno) values('1113', 'test-3', '1000', '40') | SQL#5 |
depth 1 인 biz-main-service 에는 biz-tx 가 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-main-service] StartTime[Wed Jul 15 11:29:17 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#1] StartTime[Wed Jul 15 11:29:17 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#1] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime[156] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub1-service]] StartTime[Wed Jul 15 11:29:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub1-service] StartTime[Wed Jul 15 11:29:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub1-service][CRUD#4] StartTime[Wed Jul 15 11:29:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub1-service][CRUD#4] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime[0] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub1-service] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime:[0] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub1-service]] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime[0] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#2] StartTime[Wed Jul 15 11:29:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#2] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime[15] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub2-service]] StartTime[Wed Jul 15 11:29:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub2-service] StartTime[Wed Jul 15 11:29:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub2-service][CRUD#5] StartTime[Wed Jul 15 11:29:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub2-service][CRUD#5] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub2-service] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime:[16] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub2-service]] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#3] StartTime[Wed Jul 15 11:29:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#3] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime[0] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-main-service] EndTime[Wed Jul 15 11:29:18 GMT+09:00 2015] RunTime:[235]
Activity 에서 에러가 발생한 경우
depth 1 인 biz-main-service 에는 biz-tx 가 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 인 biz-sub1-service와 biz-sub2-service 에도 biz-tx 가 각각 등록되어 있는 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-main-service] StartTime[Wed Jul 15 11:28:06 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#1] StartTime[Wed Jul 15 11:28:06 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#1] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime[281] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub1-service]] StartTime[Wed Jul 15 11:28:07 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub1-service] StartTime[Wed Jul 15 11:28:07 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub1-service][CRUD#4] StartTime[Wed Jul 15 11:28:07 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub1-service][CRUD#4] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime[16] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub1-service] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime:[172] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub1-service]] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime[172] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#2] StartTime[Wed Jul 15 11:28:07 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#2] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime[15] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub2-service]] StartTime[Wed Jul 15 11:28:07 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub2-service] StartTime[Wed Jul 15 11:28:07 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub2-service][CRUD#5] StartTime[Wed Jul 15 11:28:07 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub2-service][CRUD#5] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime[16] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub2-service] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime:[63] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub2-service]] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime[63] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#3] StartTime[Wed Jul 15 11:28:07 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#3] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime[15] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-main-service] EndTime[Wed Jul 15 11:28:07 GMT+09:00 2015] RunTime:[688]
Activity 에서 에러가 발생한 경우
depth 1 인 biz-main-service 에는 biz-tx 가 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 인 biz-sub1-service와 biz-sub2-service 에는 transaction-manager가 등록되어 있지 않은 경우
==> depth 1 인 biz-main-service 에는 biz-tx 가 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우와 같은 결과를 가집니다.
depth 1 인 biz-main-service 에는 transaction-manager 가 등록되어 있지 않고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-main-service] StartTime[Wed Jul 15 13:50:48 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#1] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#1] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime[215] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub1-service]] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub1-service] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub1-service][CRUD#4] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub1-service][CRUD#4] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub1-service] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime:[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub1-service]] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#2] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#2] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub2-service]] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub2-service] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub2-service][CRUD#5] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub2-service][CRUD#5] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub2-service] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime:[16] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub2-service]] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#3] StartTime[Wed Jul 15 13:50:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#3] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime[15] [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-main-service] EndTime[Wed Jul 15 13:50:49 GMT+09:00 2015] RunTime:[365]
Activity 에서 에러가 발생한 경우
depth 1 인 biz-main-service 에는 transaction-manager 가 등록되어 있지 않고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 인 biz-sub1-service와 biz-sub2-service 에는 biz-tx 가 각각 등록되어 있는 경우
GlueService가 정상 종료한 경우
[main] WARN c.p.g.b.c.GlueBizControllerImpl - running in EDUCATION MODE : 1 [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-main-service] StartTime[Wed Jul 15 14:26:36 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#1] StartTime[Wed Jul 15 14:26:36 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#1] EndTime[Wed Jul 15 14:26:36 GMT+09:00 2015] RunTime[118] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub1-service]] StartTime[Wed Jul 15 14:26:36 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub1-service] StartTime[Wed Jul 15 14:26:36 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub1-service][CRUD#4] StartTime[Wed Jul 15 14:26:36 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub1-service][CRUD#4] EndTime[Wed Jul 15 14:26:36 GMT+09:00 2015] RunTime[15] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub1-service] EndTime[Wed Jul 15 14:26:36 GMT+09:00 2015] RunTime:[63] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub1-service]] EndTime[Wed Jul 15 14:26:36 GMT+09:00 2015] RunTime[63] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#2] StartTime[Wed Jul 15 14:26:36 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#2] EndTime[Wed Jul 15 14:26:36 GMT+09:00 2015] RunTime[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub2-service]] StartTime[Wed Jul 15 14:26:36 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub2-service] StartTime[Wed Jul 15 14:26:36 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub2-service][CRUD#5] StartTime[Wed Jul 15 14:26:37 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-sub2-service][CRUD#5] EndTime[Wed Jul 15 14:26:37 GMT+09:00 2015] RunTime[0] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-sub2-service] EndTime[Wed Jul 15 14:26:37 GMT+09:00 2015] RunTime:[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][SubService[biz-sub2-service]] EndTime[Wed Jul 15 14:26:37 GMT+09:00 2015] RunTime[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#3] StartTime[Wed Jul 15 14:26:37 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-main-service][CRUD#3] EndTime[Wed Jul 15 14:26:37 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-main-service] EndTime[Wed Jul 15 14:26:37 GMT+09:00 2015] RunTime:[294]
Activity 에서 에러가 발생한 경우
depth 1 인 biz-main-service 에는 transaction-manager 가 등록되어 있지 않고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 인 biz-sub1-service와 biz-sub2-service 에도 transaction-manager 가 등록되어 있지 않는 경우
==> depth 1 인 biz-main-service 에는 transaction-manager 가 등록되어 있지 않고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우와 같은 결과를 가집니다.
depth 1부터 depth n까지의 GlueService에서 사용하는 DB연결정보가 2개 이상인 경우입니다.
즉, GlueService에서 사용하는 DAO와 Transaction Manager 가 1개의 DB 연결정보와 한 세트인데, 이것이 2벌 이상인 경우 입니다.
다음은 biz-dataSource :: biz-tx :: biz-dao 가 한 세트로 biz2-dataSource :: biz2-tx :: biz2-dao 가 한 세트로 이루어진 applicationContext.xml 예제입니다. (dataSource의 autoCommit값은 false 입니다)
<beans ... > ... <bean id="biz-dao" class="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao"> <property name="dataSource" ref="biz-dataSource"/> <property name="queryManager" ref= ... /> </bean> <bean id="biz-tx" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager"> <property name="dataSource" ref="biz-dataSource"/> </bean> <bean id="biz-dataSource" class= ... /> ... <bean id="biz2-dao" class="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao"> <property name="dataSource" ref="biz2-dataSource"/> <property name="queryManager" ref= ... /> </bean> <bean id="biz2-tx" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager"> <property name="dataSource" ref="biz2-dataSource"/> </bean> <bean id="biz2-dataSource" class= ... /> ... </beans>
이 경우의 권고사항은 다음과 같습니다.
DAO 를 사용하는 모든 GlueService에 해당 DAO 와 관계된 transaction-manager 를 설정합니다.
특히 depth 1 에 속하는 GlueService에는 모든 transaction-manager 를 항상 설정합니다.
<service ...> <transaction-manager id="biz-tx" commit="true"/> <transaction-manager id="biz2-tx" commit="true"/> <activity .../> ... </service>
예외> depth 1 에 속하는 GlueService에서 사용하지 않은 DAO와 관계된 transaction-manager 는 설정하지 않을 수 있습니다.
예외> depth n 에 속하는 GlueService에서 사용하지 않은 DAO와 관계된 transaction-manager 는 설정하지 않을 수 있습니다.
SubService activity의 new-transaction property의 값은 false를 사용합니다.
<service ...> ... <activity ... class="com.poscoict.glueframework.biz.activity.GlueSubService"> ... <property name="new-transaction" value="false"/> ... </activity> ... </service>
예외> SubService activity가 속한 GlueService(depth n)에 transaction-manager 가 설정되어 있지 않고, SubService activity에 의해 실행되는 GlueService(depth n+1)에서 DAO를 사용한다면, new-transaction property의 값은 true 를 사용합니다.
예외> 다른 depth의 GlueService 간에 transaction을 분리하고자 하는 경우 new-transaction property의 값은 true를 사용할 수 있습니다.
다음은 권고사항에 따른 시나리오 입니다.
depth | ServiceName | ActivityName | DML | - |
---|---|---|---|---|
1 | biz-m2-service | CRUD#1 | insert into emp(empno, ename, sal, deptno) values('1111', 'test-1', '1000', '40') | biz-dao |
2 | biz-s1-service | CRUD#3 | insert into emp(empno, ename, sal, deptno) values('1111', 'test-a', '1000', '40') | biz2-dao |
1 | biz-m2-service | CRUD#2 | insert into emp(empno, ename, sal, deptno) values('1112', 'test-2', '1000', '40') | biz-dao |
depth 1 인 biz-m2-service 에는 biz-tx 와 biz2-tx 가 순서대로 둘 다 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] StartTime[Wed Jul 15 18:54:27 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz2-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] StartTime[Wed Jul 15 18:54:27 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] EndTime[Wed Jul 15 18:54:27 GMT+09:00 2015] RunTime[140] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] StartTime[Wed Jul 15 18:54:27 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] StartTime[Wed Jul 15 18:54:27 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] StartTime[Wed Jul 15 18:54:27 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] EndTime[Wed Jul 15 18:54:27 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] EndTime[Wed Jul 15 18:54:27 GMT+09:00 2015] RunTime:[16] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] EndTime[Wed Jul 15 18:54:27 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] StartTime[Wed Jul 15 18:54:27 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] EndTime[Wed Jul 15 18:54:27 GMT+09:00 2015] RunTime[0] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz2-tx [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] EndTime[Wed Jul 15 18:54:27 GMT+09:00 2015] RunTime:[298]
Activity 에서 에러가 발생한 경우
depth 1 인 biz-m2-service 에는 biz-tx 와 biz2-tx 가 순서대로 둘 다 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 인 biz-s1-service 에는 biz2-tx 가 등록되어 있는 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] StartTime[Wed Jul 15 19:19:39 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz2-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] StartTime[Wed Jul 15 19:19:39 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] EndTime[Wed Jul 15 19:19:39 GMT+09:00 2015] RunTime[141] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] StartTime[Wed Jul 15 19:19:39 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] StartTime[Wed Jul 15 19:19:39 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz2-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] StartTime[Wed Jul 15 19:19:39 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] EndTime[Wed Jul 15 19:19:39 GMT+09:00 2015] RunTime[16] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz2-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] EndTime[Wed Jul 15 19:19:39 GMT+09:00 2015] RunTime:[125] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] EndTime[Wed Jul 15 19:19:39 GMT+09:00 2015] RunTime[125] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] StartTime[Wed Jul 15 19:19:39 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] EndTime[Wed Jul 15 19:19:39 GMT+09:00 2015] RunTime[0] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz2-tx [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] EndTime[Wed Jul 15 19:19:40 GMT+09:00 2015] RunTime:[359]
Activity 에서 에러가 발생한 경우
depth 1 인 biz-m2-service 에는 biz-tx 와 biz2-tx 가 순서대로 둘 다 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 인 biz-s1-service 에는 transaction-manager 가 등록되어 있지 않는 경우
==> depth 1 인 biz-m2-service 에는 biz-tx 와 biz2-tx 가 순서대로 둘 다 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우와 같은 결과를 가집니다.
depth 1 인 biz-m2-service 에는 biz-dao 와 관계된 biz-tx 만 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] StartTime[Thu Jul 16 14:38:51 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] StartTime[Thu Jul 16 14:38:52 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] EndTime[Thu Jul 16 14:38:52 GMT+09:00 2015] RunTime[140] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] StartTime[Thu Jul 16 14:38:52 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] StartTime[Thu Jul 16 14:38:52 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] StartTime[Thu Jul 16 14:38:52 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] EndTime[Thu Jul 16 14:38:52 GMT+09:00 2015] RunTime[15] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] EndTime[Thu Jul 16 14:38:52 GMT+09:00 2015] RunTime:[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] EndTime[Thu Jul 16 14:38:52 GMT+09:00 2015] RunTime[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] StartTime[Thu Jul 16 14:38:52 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] EndTime[Thu Jul 16 14:38:52 GMT+09:00 2015] RunTime[16] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] EndTime[Thu Jul 16 14:38:52 GMT+09:00 2015] RunTime:[266]
Activity 에서 에러가 발생한 경우
depth 1 인 biz-m2-service 에는 biz-dao 와 관계된 biz-tx 만 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 의 GlueService 인 biz-s1-service 에는 biz2-dao와 관계된 biz2-tx 가 등록되어 있는 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] StartTime[Thu Jul 16 14:49:48 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] StartTime[Thu Jul 16 14:49:48 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] EndTime[Thu Jul 16 14:49:49 GMT+09:00 2015] RunTime[140] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] StartTime[Thu Jul 16 14:49:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] StartTime[Thu Jul 16 14:49:49 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz2-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] StartTime[Thu Jul 16 14:49:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] EndTime[Thu Jul 16 14:49:49 GMT+09:00 2015] RunTime[16] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz2-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] EndTime[Thu Jul 16 14:49:49 GMT+09:00 2015] RunTime:[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] EndTime[Thu Jul 16 14:49:49 GMT+09:00 2015] RunTime[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] StartTime[Thu Jul 16 14:49:49 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] EndTime[Thu Jul 16 14:49:49 GMT+09:00 2015] RunTime[0] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] EndTime[Thu Jul 16 14:49:49 GMT+09:00 2015] RunTime:[251]
Activity 에서 에러가 발생한 경우
depth 1 인 biz-m2-service 에는 biz-dao 와 관계된 biz-tx 만 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 의 biz-s1-service 에는 transaction-manager 가 등록되어 있지 않는 경우
==> depth 1 인 biz-m2-service 에는 biz-dao 와 관계된 biz-tx 만 등록되어 있고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우와 같은 결과를 가집니다.
depth 1 의 biz-m2-service 에는 transaction-manager 가 등록되어 있지 않고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] StartTime[Thu Jul 16 10:45:30 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] StartTime[Thu Jul 16 10:45:30 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] EndTime[Thu Jul 16 10:45:30 GMT+09:00 2015] RunTime[187] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] StartTime[Thu Jul 16 10:45:30 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] StartTime[Thu Jul 16 10:45:30 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] StartTime[Thu Jul 16 10:45:30 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] EndTime[Thu Jul 16 10:45:30 GMT+09:00 2015] RunTime[15] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] EndTime[Thu Jul 16 10:45:30 GMT+09:00 2015] RunTime:[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] EndTime[Thu Jul 16 10:45:30 GMT+09:00 2015] RunTime[31] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] StartTime[Thu Jul 16 10:45:30 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] EndTime[Thu Jul 16 10:45:30 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] EndTime[Thu Jul 16 10:45:30 GMT+09:00 2015] RunTime:[297]
Activity 에서 에러가 발생한 경우
depth 1 의 biz-m2-service 에는 transaction-manager 가 등록되어 있지 않고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 의 biz-s1-service 에는 biz2-dao와 관계된 biz2-tx 가 등록되어 있는 경우
GlueService가 정상 종료한 경우
[main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] StartTime[Thu Jul 16 17:24:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] StartTime[Thu Jul 16 17:24:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#1] EndTime[Thu Jul 16 17:24:18 GMT+09:00 2015] RunTime[156] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] StartTime[Thu Jul 16 17:24:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] StartTime[Thu Jul 16 17:24:18 GMT+09:00 2015] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Start TX : biz2-tx [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] StartTime[Thu Jul 16 17:24:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-s1-service][CRUD#3] EndTime[Thu Jul 16 17:24:18 GMT+09:00 2015] RunTime[0] [main] DEBUG c.p.g.b.c.GlueBizControllerImpl - Commit TX : biz2-tx [main] INFO c.p.g.b.c.GlueBizControllerImpl - SubServiceName:[biz-s1-service] EndTime[Thu Jul 16 17:24:18 GMT+09:00 2015] RunTime:[47] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][SubService] EndTime[Thu Jul 16 17:24:18 GMT+09:00 2015] RunTime[47] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] StartTime[Thu Jul 16 17:24:18 GMT+09:00 2015] [main] INFO c.p.g.b.c.GlueService$GlueActivityHandler - ActivityName:[biz-m2-service][CRUD#2] EndTime[Thu Jul 16 17:24:18 GMT+09:00 2015] RunTime[16] [main] INFO c.p.g.b.c.GlueBizControllerImpl - ServiceName:[biz-m2-service] EndTime[Thu Jul 16 17:24:18 GMT+09:00 2015] RunTime:[298]
Activity 에서 에러가 발생한 경우
depth 1 의 biz-m2-service 에는 transaction-manager 가 등록되어 있지 않고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 true 이고,
dpeth 2 의 biz-s1-service 에는 transaction-manager 가 등록되어 있지 않는 경우
==> depth 1 의 biz-m2-service 에는 transaction-manager 가 등록되어 있지 않고,
depth 1 에 속한 SubService activity의 new-transaction property의 값은 false 인 경우와 같은 결과를 가집니다.
GlueService에서 DAO를 통해 Data를 변경을 하는 경우, DB Lock을 발생시키지 않도록 유의합니다.
DB 사용이 없는 경우 SubService activity의 new-transaction property를 생략하거나 그 값은 false를 사용합니다.