Java 类org.quartz.StatefulJob 实例源码

项目:sakai    文件:SpringJobBeanWrapper.java   
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
   String beanId = jobExecutionContext.getJobDetail().getJobDataMap().getString(SPRING_BEAN_NAME);
   Job job = (Job) ComponentManager.get(beanId);
   if (job instanceof StatefulJob) {
      log.warn("Non-stateful wrapper used with stateful job: "+ beanId+
      " You probably wanted to use SpringStatefulJobBeanWrapper for this job.");
   }
   job.execute(jobExecutionContext);
}
项目:sakai    文件:SpringJobBeanWrapper.java   
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
   String beanId = jobExecutionContext.getJobDetail().getJobDataMap().getString(SPRING_BEAN_NAME);
   Job job = (Job) ComponentManager.get(beanId);
   if (job instanceof StatefulJob) {
      log.warn("Non-stateful wrapper used with stateful job: "+ beanId+
      " You probably wanted to use SpringStatefulJobBeanWrapper for this job.");
   }
   job.execute(jobExecutionContext);
}