From 443ad5168057c88a9d4ab3f3b9bfba02e5e54c70 Mon Sep 17 00:00:00 2001 From: limju Date: Thu, 26 Oct 2023 12:44:50 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=B0=B0=EC=B9=98=20=EC=84=9C=EB=B9=84?= =?UTF-8?q?=EC=8A=A4=20=EB=A9=94=EC=86=8C=EB=93=9C=20Transactional(propaga?= =?UTF-8?q?tion=20=3D=20Propagation.REQUIRES=5FNEW)=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kr/xit/biz/ens/service/EnsBatchService.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java index 983fcc3..e948454 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java @@ -46,12 +46,14 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; /** *
  * description : 모바일 전자고지 배치 서비스
- *
+ *               - 배치에서 호출되는 클래스로 배치 로그등 Transaction 분리 필요
+ *               - 메소드 트랜잭션 Transactional(propagation = Propagation.REQUIRES_NEW)로 선언
  * packageName : kr.xit.biz.ens.service
  * fileName    : EnsBatchService
  * author      : limju
@@ -128,7 +130,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
      * 
*/ @Override - @Transactional + @Transactional(propagation = Propagation.REQUIRES_NEW) public void accept(final EnsDTO.BatchEnsRequest reqDTO) { final List list = mapper.selectAcceptTgts(reqDTO); String sndngDt = null; @@ -215,7 +217,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc * */ @Override - @Transactional + @Transactional(propagation = Propagation.REQUIRES_NEW) public void make(final EnsDTO.BatchEnsRequest reqDTO) { final String sndngProcessSttus2 = ApiConstants.SndngProcessStatus.SENDING1.getCode(); final String sndngProcessSttus3 = ApiConstants.SndngProcessStatus.SENDING2.getCode(); @@ -292,7 +294,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc * */ @Override - @Transactional + @Transactional(propagation = Propagation.REQUIRES_NEW) public void sendBulks(final EnsDTO.BatchEnsRequest reqDTO) { // 발송/통합발송 마스터에서 대상 조회 @@ -339,7 +341,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc * @param reqDTO BatchEnsRequest */ @Override - @Transactional + @Transactional(propagation = Propagation.REQUIRES_NEW) public void findKkoMyDocStatusBulks(final EnsDTO.BatchEnsRequest reqDTO) { final String url = apiHost + apiKkoBulkStatus; @@ -388,7 +390,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc * @param reqDTO BatchEnsRequest */ @Override - @Transactional + @Transactional(propagation = Propagation.REQUIRES_NEW) public void close(final EnsDTO.BatchEnsRequest reqDTO) { final List list = mapper.selectCloseTgts(reqDTO.getSndngProcessSttus());