거래고유번호 맨앞에 instid 추가
This commit is contained in:
@@ -18,6 +18,7 @@ import com.eactive.eai.adapter.http.dynamic.filter.HttpAdapterFilterFactory;
|
|||||||
import com.eactive.eai.adapter.http.dynamic.filter.HttpAdapterFilterType;
|
import com.eactive.eai.adapter.http.dynamic.filter.HttpAdapterFilterType;
|
||||||
import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException;
|
import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException;
|
||||||
import com.eactive.eai.common.TransactionContextKeys;
|
import com.eactive.eai.common.TransactionContextKeys;
|
||||||
|
import com.eactive.eai.common.server.EAIServerManager;
|
||||||
import com.eactive.eai.common.util.Logger;
|
import com.eactive.eai.common.util.Logger;
|
||||||
import com.eactive.eai.common.util.TxSiftContext;
|
import com.eactive.eai.common.util.TxSiftContext;
|
||||||
import com.eactive.eai.common.util.UUIDGenerator;
|
import com.eactive.eai.common.util.UUIDGenerator;
|
||||||
@@ -31,13 +32,20 @@ public abstract class HttpAdapterServiceSupport implements HttpAdapterService, H
|
|||||||
public static final String PROPERTIES_NAME_CLIENT_ID = "clientId";
|
public static final String PROPERTIES_NAME_CLIENT_ID = "clientId";
|
||||||
static Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER);
|
static Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER);
|
||||||
private ObjectMapper mapper = new ObjectMapper();
|
private ObjectMapper mapper = new ObjectMapper();
|
||||||
|
EAIServerManager eaiServerManager;
|
||||||
|
String instid = null;
|
||||||
|
|
||||||
public Object service(String adptGrpName, String adptName, Object message, Properties prop,
|
public Object service(String adptGrpName, String adptName, Object message, Properties prop,
|
||||||
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
String uuid = prop.getProperty(TransactionContextKeys.TRANSACTION_UUID);
|
String uuid = prop.getProperty(TransactionContextKeys.TRANSACTION_UUID);
|
||||||
boolean bMDCput = false;
|
boolean bMDCput = false;
|
||||||
|
|
||||||
if(uuid == null) {
|
if(uuid == null) {
|
||||||
uuid = UUIDGenerator.getUUID().toString().replaceAll("-", "");
|
if(instid == null) {
|
||||||
|
eaiServerManager = EAIServerManager.getInstance();
|
||||||
|
instid = eaiServerManager.getGroupInstId();
|
||||||
|
}
|
||||||
|
uuid = instid + UUIDGenerator.getUUID().toString().replaceAll("-", "");
|
||||||
prop.setProperty(TransactionContextKeys.TRANSACTION_UUID, uuid);
|
prop.setProperty(TransactionContextKeys.TRANSACTION_UUID, uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user