// 開始ログ出力
LOG.info("TG-EXPORTER-01001",
new Date(), targetName, batchId, jobflowId, executionId);
// パラメータオブジェクトを作成
ExporterBean bean = createBean(targetName, batchId, jobflowId, executionId);
if (bean == null) {
// パラメータのチェックでエラー
LOG.error("TG-EXPORTER-01006",
new Date(), targetName, batchId, jobflowId, executionId);
return Constants.EXIT_CODE_ERROR;
}
if (RuntimeContext.get().isSimulation()) {
// check only DB connection
DBConnection.getConnection().close();
return Constants.EXIT_CODE_SUCCESS;
}
// ジョブフロー実行IDの排他制御
LOG.info("TG-EXPORTER-01018",
targetName, batchId, jobflowId, executionId);
try {
lockConn = DBConnection.getConnection();
if (!DBAccessUtil.getJobflowInstanceLock(bean.getExecutionId(), lockConn)) {
LOG.error("TG-EXPORTER-01016",
new Date(), targetName, batchId, jobflowId, executionId);
return Constants.EXIT_CODE_ERROR;
} else {
LOG.info("TG-EXPORTER-01019",
targetName, batchId, jobflowId, executionId);
}
} catch (BulkLoaderSystemException e) {
LOG.log(e);
LOG.error("TG-EXPORTER-01017",
new Date(), targetName, batchId, jobflowId, executionId);
return Constants.EXIT_CODE_ERROR;
}
// ジョブフローSIDを取得する
try {
String jobflowSid = DBAccessUtil.selectJobFlowSid(bean.getExecutionId());
bean.setJobflowSid(jobflowSid);
} catch (BulkLoaderSystemException e) {
LOG.log(e);
LOG.error("TG-EXPORTER-01010",
new Date(), targetName, batchId, jobflowId, executionId);
return Constants.EXIT_CODE_ERROR;
}
// 実行する処理を判断する
JudgeExecProcess judge = createJudgeExecProcess();
if (!judge.judge(bean)) {
return Constants.EXIT_CODE_ERROR;
}
// TODO ファイル転送とDBロードをマルチスレッドで起動処理する
// テンポラリテーブル削除処理を実行する
if (judge.isExecTempTableDelete()) {
LOG.info("TG-EXPORTER-01020",
targetName, batchId, jobflowId, executionId, bean.getJobflowSid());
TempTableDelete tempDelete = createTempTableDelete();
if (!tempDelete.delete(judge.getExportTempTableBean(), true)) {
LOG.error("TG-EXPORTER-01013",
new Date(), targetName, batchId, jobflowId, executionId, bean.getJobflowSid());
return Constants.EXIT_CODE_ERROR;
} else {
LOG.info("TG-EXPORTER-01021",
targetName, batchId, jobflowId, executionId, bean.getJobflowSid());
}
}
// Exportファイル受信処理処理を実行する
if (judge.isExecReceive()) {