umsDispatums dispatcher 기능 변경
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context>
|
||||
|
||||
<!-- maxTotal: Maximum number of database connections in pool. Make sure you
|
||||
configure your mysqld max_connections large enough to handle
|
||||
all of your db connections. Set to -1 for no limit.
|
||||
-->
|
||||
|
||||
<!-- maxIdle: Maximum number of idle database connections to retain in pool.
|
||||
Set to -1 for no limit. See also the DBCP documentation on this
|
||||
and the minEvictableIdleTimeMillis configuration parameter.
|
||||
-->
|
||||
|
||||
<!-- maxWaitMillis: Maximum time to wait for a database connection to become available
|
||||
in ms, in this example 10 seconds. An Exception is thrown if
|
||||
this timeout is exceeded. Set to -1 to wait indefinitely.
|
||||
-->
|
||||
|
||||
<!-- username and password: MySQL username and password for database connections -->
|
||||
|
||||
<!-- driverClassName: Class name for the old mm.mysql JDBC driver is
|
||||
org.gjt.mm.mysql.Driver - we recommend using Connector/J though.
|
||||
Class name for the official MySQL Connector/J driver is com.mysql.jdbc.Driver.
|
||||
-->
|
||||
|
||||
<!-- url: The JDBC connection url for connecting to your MySQL database.
|
||||
-->
|
||||
|
||||
<Resource name="jdbc/dsOBP_AGW" auth="Container" type="javax.sql.DataSource"
|
||||
maxTotal="10" maxIdle="10" maxWaitMillis="10000"
|
||||
username="AGWAPP" password="AGWAPP123!" driverClassName="oracle.jdbc.OracleDriver"
|
||||
url="jdbc:oracle:thin:@192.168.240.177:1599:DAPM"/>
|
||||
<Resource name="jdbc/dsOBP_BAP" auth="Container" type="javax.sql.DataSource"
|
||||
maxTotal="10" maxIdle="10" maxWaitMillis="10000"
|
||||
username="BAPAPP" password="BAPAPP123!" driverClassName="oracle.jdbc.OracleDriver"
|
||||
url="jdbc:oracle:thin:@192.168.240.177:1599:DAPM"/>
|
||||
<Resource name="jdbc/dsOBP_EMS" auth="Container" type="javax.sql.DataSource"
|
||||
maxTotal="10" maxIdle="10" maxWaitMillis="10000"
|
||||
username="EMSAPP" password="EMSAPP123!" driverClassName="oracle.jdbc.OracleDriver"
|
||||
url="jdbc:oracle:thin:@192.168.240.177:1599:DAPM"/>
|
||||
</Context>
|
||||
+14
-1
@@ -35,5 +35,18 @@
|
||||
| kjb.ums.api_key | UMS API Key | 7cca6d58-e4f7-474d-9edd-525806bc99ff | 알림톡 | |
|
||||
| kjb.ums.connection_timeout | UMS 커넥션 타임아웃(seconds) | 5 | 알림톡 | |
|
||||
| kjb.ums.response_timeout | UMS 응답 타임아웃(seconds) | 10 | 알림톡 | |
|
||||
| | | | | |
|
||||
|
||||
-
|
||||
```sql
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.eai_batch.url', 'http://172.31.32.111:10230/BATAppWeb/EaiBatCall');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.eai_batch.connection_timeout', '5');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.eai_batch.response_timeout', '10');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.eai_batch.send_dir', '/Data/eapim/portal/sendmail/snd');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.eai_batch.backup_dir', '/Data/eapim/portal/sendmail/bak');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.eai_batch.interface_id', 'UAGFF00001UIE');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.host_url', 'http://172.31.35.144:9021');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.api_key', '7cca6d58-e4f7-474d-9edd-525806bc99ff');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.connection_timeout', '5');
|
||||
insert into EMSADM.TSEAIRM24 (PRPTYGROUPNAME, PRPTYNAME, PRPTY2VAL) values ('Monitoring', 'kjb.ums.response_timeout', '10');
|
||||
|
||||
```
|
||||
@@ -52,7 +52,7 @@ public class JobHistoryService extends AbstractEMSDataSerivce<JobHistory, String
|
||||
|
||||
String rctStatus = findRecentStatus(jobName, instanceName); // 최근 Data 조회
|
||||
|
||||
log.info("[DHJEONG]1_rctStatus-->{}, jobName-->{}, instanceName-->{}", rctStatus, jobName, instanceName);
|
||||
// log.info("[DHJEONG]1_rctStatus-->{}, jobName-->{}, instanceName-->{}", rctStatus, jobName, instanceName);
|
||||
|
||||
if (!status.equals(rctStatus) || !"E".equals(jobInfo.getChkStatus())) {
|
||||
// 'Y' 이면 무조건 등록, 'E' 이면 ==> Status 바뀌면 등록
|
||||
|
||||
@@ -8,6 +8,10 @@ import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Admin Job Configuration
|
||||
* ----------------------
|
||||
@@ -18,30 +22,31 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
// Cron Expression: */5 * * * * ?
|
||||
@Slf4j
|
||||
public class UmsDispatchJob implements Job {
|
||||
|
||||
|
||||
private final UmsDispatchService umsDispatchService;
|
||||
|
||||
|
||||
@Autowired
|
||||
public UmsDispatchJob(UmsDispatchService umsDispatchService) {
|
||||
this.umsDispatchService = umsDispatchService;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException {
|
||||
log.info("Starting Message Dispatch Job...");
|
||||
|
||||
// inst.Name 이 지정된 경우 해당 인스턴스에서만 동작
|
||||
String jobInstName = context.getJobDetail().getJobDataMap().getString("inst.Name");
|
||||
String jobInstName = context.getJobDetail().getJobDataMap().getString("execute.instances");
|
||||
if (StringUtils.isNotEmpty(jobInstName)) {
|
||||
log.debug("Job 실행 인스턴스 명이 지정되어 있음 - {}", jobInstName);
|
||||
jobInstName = jobInstName.toLowerCase();
|
||||
Set<String> propInstances = Arrays.stream(jobInstName.split(",")).map(String::trim).collect(Collectors.toSet());
|
||||
|
||||
jobInstName = jobInstName.trim();
|
||||
String instanceName = System.getProperty("inst.Name");
|
||||
if (StringUtils.isNotEmpty(instanceName)) {
|
||||
log.debug("현재 인스턴스 명 : {}", instanceName);
|
||||
instanceName = instanceName.trim();
|
||||
instanceName = instanceName.trim().toLowerCase();
|
||||
|
||||
if (!jobInstName.equalsIgnoreCase(instanceName)) {
|
||||
if (!propInstances.contains(instanceName)) {
|
||||
log.debug("Job 인스턴스명과 현재 인스턴스명이 다름. 종료 처리");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user