Compare commits

...

10 Commits

Author SHA1 Message Date
2210045 b63086c134 ezgatormodule sun 패키지 호출부분 삭제 2026-03-25 10:23:34 +09:00
2210045 b4349fbe49 삭제시 오류발생 2026-03-25 09:32:35 +09:00
2210045 cb75e049fd 체크파일생성 여부 linksvr.checkfile.create.yn 2026-03-25 09:14:52 +09:00
2210045 2f4fe7ca04 ezgatorconsoleclient 만 사용으로 삭제 2026-03-25 08:54:46 +09:00
2210045 420df5ce7a package 수정 2026-02-26 14:37:02 +09:00
2210045 32c7fc2410 오타 2026-02-26 11:39:53 +09:00
2210045 48552e542c 오타수정 2026-02-26 11:38:44 +09:00
2210045 ac3835a093 cronCommand 추가 2026-02-26 11:37:29 +09:00
2210045 58bf67715f errorcode 선언수정 2026-02-26 11:08:04 +09:00
2210045 5c14a7ce0b errorcode static 사용 2026-02-26 10:57:16 +09:00
4 changed files with 63 additions and 11 deletions
@@ -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());