EAIMessage에 callProp를 추가하고, 동기 거래에 대한 Outbound에서 세팅한 callProp가
RequestProcessor, EAIMessage를 통해 접근 가능하도록 변경
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package com.eactive.eai.common.message;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import com.eactive.eai.message.StandardMessage;
|
||||
import com.eactive.eai.message.manager.StandardMessageManager;
|
||||
@@ -110,6 +110,7 @@ public class EAIMessage implements EAIMessageKeys, Serializable, Comparable<EAIM
|
||||
|
||||
private String authCheckdYn;
|
||||
|
||||
private Properties callProp;
|
||||
|
||||
public EAIMessage() {
|
||||
this.svcMsgs = new ArrayList<>();
|
||||
@@ -665,6 +666,14 @@ public class EAIMessage implements EAIMessageKeys, Serializable, Comparable<EAIM
|
||||
return transactionContextTransfer;
|
||||
}
|
||||
|
||||
public Properties getCallProp() {
|
||||
return callProp;
|
||||
}
|
||||
|
||||
public void setCallProp(Properties callProp) {
|
||||
this.callProp = callProp;
|
||||
}
|
||||
|
||||
/**
|
||||
* [비동기 전달 전용] 컨텍스트 전달용 Map 설정
|
||||
* @see #transactionContextTransfer
|
||||
|
||||
@@ -465,6 +465,8 @@ public class RequestProcessor extends RequestProcessorSupport {
|
||||
return getInboundErrorResponse(prop, standardMessage, mapper, vo.getRspErrorCode(), vo.getRspErrorMsg(), inboundCharset);
|
||||
}
|
||||
|
||||
eaiMsg.setCallProp(prop);
|
||||
|
||||
// set standardMessage & mapper to EAIMessage
|
||||
eaiMsg.setStandardMessage(standardMessage);
|
||||
eaiMsg.setMapper(mapper);
|
||||
@@ -1256,7 +1258,7 @@ public class RequestProcessor extends RequestProcessorSupport {
|
||||
|
||||
beforeRoute(eaiMsg, prop);
|
||||
retEaiMsg = FlowRouter.process(eaiMsg, prop);
|
||||
|
||||
retEaiMsg.setCallProp(prop);
|
||||
// 응답메시지에 Error Code기 설정되어 있을 경우
|
||||
// ExceptionHandler를 통해 응답메시지를 생성한다.
|
||||
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) {
|
||||
Map<String, Object> map = (Map<String, Object>) this.tempProp.get(HttpAdapterServiceKey.OUTBOUND_PROPERTY_MAP);
|
||||
this.resObject = map.get(HttpAdapterServiceKey.OUTBOUND_RESPONSE_MESSAGE);
|
||||
this.callProp.put(HttpAdapterServiceKey.OUTBOUND_PROPERTY_MAP, map);
|
||||
}
|
||||
standardMessage.setBizData(this.resObject, this.inboundCharset);
|
||||
try {
|
||||
//mapper.nextGuidSeq(standardMessage);
|
||||
mapper.setSendRecvDivision(standardMessage, STDMessageKeys.SEND_RECV_CD_RECV);
|
||||
StandardMessageManager standardManager = StandardMessageManager.getInstance();
|
||||
standardManager.getMessageCoordinator().coordinateSetStandardMessageError(standardMessage, mapper,
|
||||
this.resEaiMsg.getRspErrCd(), this.resEaiMsg.getRspErrMsg());
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
}
|
||||
// try {
|
||||
// //mapper.nextGuidSeq(standardMessage);
|
||||
// mapper.setSendRecvDivision(standardMessage, STDMessageKeys.SEND_RECV_CD_RECV);
|
||||
// StandardMessageManager standardManager = StandardMessageManager.getInstance();
|
||||
// standardManager.getMessageCoordinator().coordinateSetStandardMessageError(standardMessage, mapper,
|
||||
// this.resEaiMsg.getRspErrCd(), this.resEaiMsg.getRspErrMsg());
|
||||
// } catch (Exception e) {
|
||||
// logger.error(e.getMessage());
|
||||
// }
|
||||
}
|
||||
|
||||
public boolean isRequest() {
|
||||
|
||||
Reference in New Issue
Block a user