Compare commits
10 Commits
eff2a81745
...
b63086c134
| Author | SHA1 | Date | |
|---|---|---|---|
| b63086c134 | |||
| b4349fbe49 | |||
| cb75e049fd | |||
| 2f4fe7ca04 | |||
| 420df5ce7a | |||
| 32c7fc2410 | |||
| 48552e542c | |||
| ac3835a093 | |||
| 58bf67715f | |||
| 5c14a7ce0b |
Binary file not shown.
@@ -24,10 +24,10 @@ public abstract class Command implements Serializable {
|
||||
/** Command Arguments */
|
||||
protected Object args;
|
||||
|
||||
private HashMap<String,String> errorCode ;
|
||||
private static final HashMap<String,String> errorCode = new HashMap<>();
|
||||
|
||||
static {
|
||||
HashMap<String,String> errorCode = new HashMap<String,String>();
|
||||
//HashMap<String,String> errorCode = new HashMap<String,String>();
|
||||
errorCode.put("RECEAIMCM001", "Command 이름[{1}] 유효하지 않은 파라메터 타입 - {2}");
|
||||
errorCode.put("RECEAIMCM002", "Command 이름[{1}] execute 메소드 실행중 에러가 발생 - {2}");
|
||||
}
|
||||
@@ -94,10 +94,9 @@ public abstract class Command implements Serializable {
|
||||
else{
|
||||
msgArgs[1] = cause.getMessage();
|
||||
}
|
||||
if(this.errorCode != null)
|
||||
return makeMessage((String)errorCode.get(rspErrorCode),msgArgs) ;
|
||||
else
|
||||
return "error";
|
||||
String msg = makeMessage((String)errorCode.get(rspErrorCode),msgArgs) ;
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
protected static String makeMessage(String msg, String[] args) {
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.eactive.eai.agent.cron;
|
||||
|
||||
import com.eactive.eai.agent.command.Command;
|
||||
import com.eactive.eai.agent.command.CommandException;
|
||||
import com.eactive.eai.common.scheduler.SchedulerManager;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
|
||||
public class UpdateCronCommand extends Command{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public UpdateCronCommand() {
|
||||
super();
|
||||
}
|
||||
|
||||
public UpdateCronCommand(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public Object execute() throws CommandException
|
||||
{
|
||||
Logger logger = Logger.getLogger(Logger.LOGGER_SCHEDULER);
|
||||
logger.info(this.name + " Agent 가 호출되었습니다.");
|
||||
|
||||
if ( args == null || !(args instanceof String)) {
|
||||
String msg = makeException("BECEAICAG001", null);
|
||||
}
|
||||
|
||||
try {
|
||||
SchedulerManager schmng = SchedulerManager.getInstance();
|
||||
|
||||
schmng.stop();
|
||||
schmng.start();
|
||||
|
||||
logger.info(this.name + " Agent 가 성공적으로 완료되었습니다.");
|
||||
return "success";
|
||||
}catch(Exception e)
|
||||
{
|
||||
String msg = makeException("BECEAICAG002", e);
|
||||
logger.error(msg, e);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,6 +149,7 @@ public class RemoteTransfer {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
String linkSvrCheckFileCreateYn = "Y";
|
||||
try {
|
||||
Properties orgInfo = PropManager.getInstance().getProperties(
|
||||
"TelegramInfo{" + procCode + "_" + bizCode + "}");
|
||||
@@ -162,6 +163,10 @@ public class RemoteTransfer {
|
||||
rmtTrsmtFileName = nam.toUpperCase() + ext;
|
||||
}
|
||||
|
||||
|
||||
linkSvrCheckFileCreateYn = orgInfo.getProperty( "linksvr.checkfile.create.yn" );// 20260325 체크파일생성 여부
|
||||
|
||||
|
||||
logger.debug("RemoteTransfer upperCase:"+upperCase + " , rmtTrsmtFileName:"+rmtTrsmtFileName);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
@@ -177,11 +182,16 @@ public class RemoteTransfer {
|
||||
if(!ezStorYn) {
|
||||
throw new Exception("Ezgator 모듈 이용한 파일 송신 실패!");
|
||||
}
|
||||
File chkFile = new File(srcFileName+BatchDirUtil.getResponseRootExt());
|
||||
chkFile.createNewFile();
|
||||
|
||||
EzgatorUtil.store(vo.getSysIp(), vo.getSysPort(), rmtFileTrsmtPathName + "/" + rmtTrsmtFileName+BatchDirUtil.getResponseRootExt(), srcFileName+BatchDirUtil.getResponseRootExt());
|
||||
|
||||
|
||||
if(linkSvrCheckFileCreateYn != null && "N".equals(linkSvrCheckFileCreateYn)) {
|
||||
logger.debug("no check file create");
|
||||
}else {
|
||||
File chkFile = new File(srcFileName+BatchDirUtil.getResponseRootExt());
|
||||
chkFile.createNewFile();
|
||||
|
||||
EzgatorUtil.store(vo.getSysIp(), vo.getSysPort(), rmtFileTrsmtPathName + "/" + rmtTrsmtFileName+BatchDirUtil.getResponseRootExt(), srcFileName+BatchDirUtil.getResponseRootExt());
|
||||
}
|
||||
|
||||
try {
|
||||
loginfo.setThisStgePrcssRsultCd(RemoteTransferLogKeys.STATUS_SUCCESS);
|
||||
loginfo.setFileTrsmtEndHMS(DatetimeUtil.getCurrentTimeMillis());
|
||||
|
||||
Reference in New Issue
Block a user