Class GlueScheduledJobInfoLogger

java.lang.Object
com.poscoict.glueframework.scheduling.store.GlueScheduledJobInfoLogger
All Implemented Interfaces:
org.quartz.JobListener, InitializingBean

public class GlueScheduledJobInfoLogger extends Object implements org.quartz.JobListener, InitializingBean
JobListener 구현체. 스케줄링된 Job의 수행결과 정보를 DB에 저장한다.
 Bean Property

 - dataSource : (필수) oracle 연결정보.



 예제
 
 사용 예# 1

     <bean id="dblogging" class="com.poscoict.glueframework.scheduling.store.GlueScheduledJobInfoLogger">
         <property name="dataSource" ref="ds"/>
     </bean>
     <bean id="ds" class="..."/>
     <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="true">
         <property name="triggers" ...>
         ...
         <property name="globalJobListeners">
             <list>
                 <ref local="dblogging"/>
             </list>
         </property>
     </bean>
 
  • Field Details Link icon

  • Constructor Details Link icon

    • GlueScheduledJobInfoLogger Link icon

      public GlueScheduledJobInfoLogger()
  • Method Details Link icon

    • setDataSource Link icon

      public void setDataSource(DataSource dataSource)
      setter method for DI.
      Parameters:
      dataSource -
    • getName Link icon

      public String getName()
      Specified by:
      getName in interface org.quartz.JobListener
    • jobToBeExecuted Link icon

      public void jobToBeExecuted(org.quartz.JobExecutionContext context)
      Job이 실행되기 직전에 호출되는 메소드. Scheduled Job 정보를 DB에 등록한다. (참고, jobWasExecuted 메소드가 호출되는 시점에 상태(STATE)정보를 "Completed"으로 변경한다.)
      Specified by:
      jobToBeExecuted in interface org.quartz.JobListener
      Parameters:
      context -
    • jobExecutionVetoed Link icon

      public void jobExecutionVetoed(org.quartz.JobExecutionContext context)
      job 수행이 거부될 때 호출된다.
      Specified by:
      jobExecutionVetoed in interface org.quartz.JobListener
    • jobWasExecuted Link icon

      public void jobWasExecuted(org.quartz.JobExecutionContext context, org.quartz.JobExecutionException jobException)
      Job 실행이 완료되면 호출되는 메소드. 'jobToBeExecuted' 메소드에서 생성한 Row를 찾아서 정보를 업데이트한다.
      Specified by:
      jobWasExecuted in interface org.quartz.JobListener
      Parameters:
      context - job context
      jobException - job exception
    • afterPropertiesSet Link icon

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface InitializingBean
      Throws:
      Exception