EAIMessage에 callProp를 추가하고, 동기 거래에 대한 Outbound에서 세팅한 callProp가

RequestProcessor, EAIMessage를 통해 접근 가능하도록 변경
This commit is contained in:
curry772
2026-06-10 08:53:39 +09:00
parent 909cda9ffb
commit 940e5bb90c
3 changed files with 25 additions and 13 deletions
@@ -1,11 +1,11 @@
package com.eactive.eai.common.message; package com.eactive.eai.common.message;
import java.io.Serializable; import java.io.Serializable;
import java.nio.charset.Charset;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Properties;
import com.eactive.eai.message.StandardMessage; import com.eactive.eai.message.StandardMessage;
import com.eactive.eai.message.manager.StandardMessageManager; import com.eactive.eai.message.manager.StandardMessageManager;
@@ -110,6 +110,7 @@ public class EAIMessage implements EAIMessageKeys, Serializable, Comparable<EAIM
private String authCheckdYn; private String authCheckdYn;
private Properties callProp;
public EAIMessage() { public EAIMessage() {
this.svcMsgs = new ArrayList<>(); this.svcMsgs = new ArrayList<>();
@@ -665,6 +666,14 @@ public class EAIMessage implements EAIMessageKeys, Serializable, Comparable<EAIM
return transactionContextTransfer; return transactionContextTransfer;
} }
public Properties getCallProp() {
return callProp;
}
public void setCallProp(Properties callProp) {
this.callProp = callProp;
}
/** /**
* [비동기 전달 전용] 컨텍스트 전달용 Map 설정 * [비동기 전달 전용] 컨텍스트 전달용 Map 설정
* @see #transactionContextTransfer * @see #transactionContextTransfer
@@ -465,6 +465,8 @@ public class RequestProcessor extends RequestProcessorSupport {
return getInboundErrorResponse(prop, standardMessage, mapper, vo.getRspErrorCode(), vo.getRspErrorMsg(), inboundCharset); return getInboundErrorResponse(prop, standardMessage, mapper, vo.getRspErrorCode(), vo.getRspErrorMsg(), inboundCharset);
} }
eaiMsg.setCallProp(prop);
// set standardMessage & mapper to EAIMessage // set standardMessage & mapper to EAIMessage
eaiMsg.setStandardMessage(standardMessage); eaiMsg.setStandardMessage(standardMessage);
eaiMsg.setMapper(mapper); eaiMsg.setMapper(mapper);
@@ -1256,7 +1258,7 @@ public class RequestProcessor extends RequestProcessorSupport {
beforeRoute(eaiMsg, prop); beforeRoute(eaiMsg, prop);
retEaiMsg = FlowRouter.process(eaiMsg, prop); retEaiMsg = FlowRouter.process(eaiMsg, prop);
retEaiMsg.setCallProp(prop);
// 응답메시지에 Error Code기 설정되어 있을 경우 // 응답메시지에 Error Code기 설정되어 있을 경우
// ExceptionHandler를 통해 응답메시지를 생성한다. // ExceptionHandler를 통해 응답메시지를 생성한다.
if(retEaiMsg != null && !MessageUtil.checkRspErrCd(retEaiMsg.getRspErrCd())) { if(retEaiMsg != null && !MessageUtil.checkRspErrCd(retEaiMsg.getRspErrCd())) {
@@ -776,17 +776,18 @@ public abstract class DefaultProcess extends Process {
if(this.tempProp.get(HttpAdapterServiceKey.OUTBOUND_PROPERTY_MAP) instanceof Map) { if(this.tempProp.get(HttpAdapterServiceKey.OUTBOUND_PROPERTY_MAP) instanceof Map) {
Map<String, Object> map = (Map<String, Object>) this.tempProp.get(HttpAdapterServiceKey.OUTBOUND_PROPERTY_MAP); Map<String, Object> map = (Map<String, Object>) this.tempProp.get(HttpAdapterServiceKey.OUTBOUND_PROPERTY_MAP);
this.resObject = map.get(HttpAdapterServiceKey.OUTBOUND_RESPONSE_MESSAGE); this.resObject = map.get(HttpAdapterServiceKey.OUTBOUND_RESPONSE_MESSAGE);
this.callProp.put(HttpAdapterServiceKey.OUTBOUND_PROPERTY_MAP, map);
} }
standardMessage.setBizData(this.resObject, this.inboundCharset); standardMessage.setBizData(this.resObject, this.inboundCharset);
try { // try {
//mapper.nextGuidSeq(standardMessage); // //mapper.nextGuidSeq(standardMessage);
mapper.setSendRecvDivision(standardMessage, STDMessageKeys.SEND_RECV_CD_RECV); // mapper.setSendRecvDivision(standardMessage, STDMessageKeys.SEND_RECV_CD_RECV);
StandardMessageManager standardManager = StandardMessageManager.getInstance(); // StandardMessageManager standardManager = StandardMessageManager.getInstance();
standardManager.getMessageCoordinator().coordinateSetStandardMessageError(standardMessage, mapper, // standardManager.getMessageCoordinator().coordinateSetStandardMessageError(standardMessage, mapper,
this.resEaiMsg.getRspErrCd(), this.resEaiMsg.getRspErrMsg()); // this.resEaiMsg.getRspErrCd(), this.resEaiMsg.getRspErrMsg());
} catch (Exception e) { // } catch (Exception e) {
logger.error(e.getMessage()); // logger.error(e.getMessage());
} // }
} }
public boolean isRequest() { public boolean isRequest() {