public class BHiveMyBatisProcedureJob extends BHiveSqlSessionDaoSupport implements org.springframework.beans.factory.InitializingBean, BHiveIntervalCallable
[실행방법] 특정 MyBatis 구문을 주기적으로 실행. 주로 DB Procedure의 Batch 실행 <bean id="taskBatchJob1" class="bhive.spring.job.BHiveMyBatisProcedureJob"> <constructor-arg name="0" value="was1"/> <constructor-arg name="1" value="persistence.BatchJobDAO.eslrpcDummyTest"/> <constructor-arg name="2" ref="executor"/> </bean>
| Modifier and Type | Field and Description |
|---|---|
protected String |
instanceNameToRunning
배치를 실행할 InstanceName (없거나 null이여도 실행)
|
protected org.springframework.core.task.TaskExecutor |
taskExecutor
로직 반복실행에 사용할 TaskExecutor
|
logger| Constructor and Description |
|---|
BHiveMyBatisProcedureJob(String instanceNameToRunning,
String statement,
org.springframework.core.task.TaskExecutor taskExecutor)
생성자
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
doIntervalProcess()
설정된 MyBatis statement를 실행
|
void |
runIntervalProcessTask()
refresh 체크를 위한 Task를 시작 (BHiveRefreshCheckTask)
|
checkDaoConfig, clearCache, close, commit, commit, delete, delete, flushStatements, getConfiguration, getConnection, getCurrentMethodName, getMapper, getSqlSession, initDao, insert, insert, rollback, rollback, select, select, select, selectList, selectList, selectList, selectMap, selectMap, selectMap, selectOne, selectOne, setSqlSession, setSqlSessionFactory, setSqlSessionTemplate, update, updateprotected String instanceNameToRunning
protected org.springframework.core.task.TaskExecutor taskExecutor
public BHiveMyBatisProcedureJob(String instanceNameToRunning, String statement, org.springframework.core.task.TaskExecutor taskExecutor)
instanceNameToRunning - 실행할 서버 WasContainerName (설정시 해당 WasContainer의 인스턴스만 실행됨. WAS Pool에서 특정 WAS에서만 실행하는 기능)statement - 주기적으로 실행할 MyBatis Statement NametaskExecutor - Job실행에 사용할 taskExecutorpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class BHiveSqlSessionDaoSupportpublic void runIntervalProcessTask()
BHiveIntervalCallablerunIntervalProcessTask in interface BHiveIntervalCallablepublic void doIntervalProcess()
doIntervalProcess in interface BHiveIntervalCallabledoIntervalProcess in interface BHiveJobCallableBHiveIntervalCallable.doIntervalProcess()Copyright © 2018. All rights reserved.