com.poscoict.glueframework.scheduling.store
Class GlueScheduledJobInfoLogger

java.lang.Object
  extended by com.poscoict.glueframework.scheduling.store.GlueScheduledJobInfoLogger
All Implemented Interfaces:
org.quartz.JobListener, org.springframework.beans.factory.InitializingBean

public class GlueScheduledJobInfoLogger
extends Object
implements org.quartz.JobListener, org.springframework.beans.factory.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>
 


Nested Class Summary
static class GlueScheduledJobInfoLogger.JobLoggingQuery
          DBMS ¿¡ µû¸¥ SQL¹®
 
Field Summary
protected static String ROW_KEY
           
 
Constructor Summary
GlueScheduledJobInfoLogger()
           
 
Method Summary
 void afterPropertiesSet()
           
 String getName()
           
 void jobExecutionVetoed(org.quartz.JobExecutionContext context)
          job ¼öÇàÀÌ °ÅºÎµÉ ¶§ È£ÃâµÈ´Ù.
 void jobToBeExecuted(org.quartz.JobExecutionContext context)
          JobÀÌ ½ÇÇàµÇ±â Á÷Àü¿¡ È£ÃâµÇ´Â ¸Þ¼Òµå.
 void jobWasExecuted(org.quartz.JobExecutionContext context, org.quartz.JobExecutionException jobException)
          Job ½ÇÇàÀÌ ¿Ï·áµÇ¸é È£ÃâµÇ´Â ¸Þ¼Òµå.
 void setDataSource(DataSource dataSource)
          setter method for DI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROW_KEY

protected static final String ROW_KEY
See Also:
Constant Field Values
Constructor Detail

GlueScheduledJobInfoLogger

public GlueScheduledJobInfoLogger()
Method Detail

setDataSource

public void setDataSource(DataSource dataSource)
setter method for DI.

Parameters:
dataSource -

getName

public String getName()
Specified by:
getName in interface org.quartz.JobListener

jobToBeExecuted

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

public void jobExecutionVetoed(org.quartz.JobExecutionContext context)
job ¼öÇàÀÌ °ÅºÎµÉ ¶§ È£ÃâµÈ´Ù.

Specified by:
jobExecutionVetoed in interface org.quartz.JobListener

jobWasExecuted

public void jobWasExecuted(org.quartz.JobExecutionContext context,
                           org.quartz.JobExecutionException jobException)
Job ½ÇÇàÀÌ ¿Ï·áµÇ¸é È£ÃâµÇ´Â ¸Þ¼Òµå. 'jobToBeExecuted' ¸Þ¼Òµå¿¡¼­ »ý¼ºÇÑ Row¸¦ ã¾Æ¼­ Á¤º¸¸¦ ¾÷µ¥ÀÌÆ®ÇÑ´Ù.

Specified by:
jobWasExecuted in interface org.quartz.JobListener
Parameters:
jobException - job exception
context - job context

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2013–2018 POSCO ICT. All rights reserved.