-서비스 명칭 별 트랜잭션 기준
동사 영문명 |
동사 한글명 |
* 트랜잭션 |
acquire |
취득 |
O |
adjust |
조정 |
O |
apply |
적용 |
O |
calcurate |
계산 |
O |
cancel |
취소 |
O |
certify |
인증 |
O |
change |
변경 |
O |
check |
검사 |
X |
create |
생성 |
O |
decide |
판단 |
X |
delay |
지연 |
O |
delete |
삭제 |
O |
delevery |
출고 |
O |
find |
찾기 |
X |
get |
채번 |
X |
handle |
처리 |
O |
inhouse |
입고 |
O |
isExist |
존재 |
X |
issue |
발행 |
O |
make |
작성 |
O |
manage |
관리 |
O |
regist |
등록 |
O |
request |
요청 |
O |
retrieve |
조회 |
X |
save |
저장 |
O |
search |
검색 |
X |
select |
선택 |
X |
send |
발송 |
O |
update |
수정 |
O |
wait |
대기 |
O |
process |
처리 |
O |
context-trasaction.xml 파일 내용
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="check*" read-only="true" propagation="SUPPORTS" timeout="60"/>
<tx:method name="decide*" read-only="true" propagation="SUPPORTS" timeout="60"/>
<tx:method name="find*" read-only="true" propagation="SUPPORTS" timeout="60"/>
<tx:method name="get*" read-only="true" propagation="SUPPORTS" timeout="60"/>
<tx:method name="isExist*" read-only="true" propagation="SUPPORTS" timeout="60"/>
<tx:method name="retrieve*" read-only="true" propagation="SUPPORTS" timeout="60"/>
<tx:method name="search*" read-only="true" propagation="SUPPORTS" timeout="60"/>
<tx:method name="select*" read-only="true" propagation="SUPPORTS" timeout="60"/>
<tx:method name="acquire*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="adjust*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="apply*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="calcurate*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="cancel*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="certify*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="change*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="create*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="delay*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="delete*" rollback-for="Exception" propagation="REQUIRED" timeout="60"/>
<tx:method name="delevery*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="handle*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="inhouse*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="issue*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="make*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="manage*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="regist*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="request*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="save*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="send*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="update*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="wait*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="process*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
<tx:method name="new*" rollback-for="Exception" propagation="REQUIRES_NEW" timeout="120"/>
<tx:method name="push*" rollback-for="Exception" propagation="REQUIRES_NEW" timeout="120"/>
<!-- Long term transaction -->
<tx:method name="long*" rollback-for="Exception" propagation="REQUIRED" timeout="120"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="requiredTx" expression="execution(public * com.프로젝트경로..svc.*Impl.*(..)) || execution(public * com.프로젝트경로.*Impl.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="requiredTx" />
</aop:config>
</beans>
'일 > Spring' 카테고리의 다른 글
자바 인코딩 테스트 코드 (0) | 2018.05.04 |
---|---|
대용량 엑셀 다운로드 (0) | 2018.05.03 |
ehcache 캐시 설정 (0) | 2018.01.11 |
JUnit 세팅 방법 및 참고 포스트 (0) | 2018.01.11 |
mybatis interceptor 를 이용해서 쿼리 로그를 출력/디비에다 저장하기 (0) | 2017.04.27 |