1 17 package org.apache.servicemix.components.quartz; 18 19 import org.quartz.Job; 20 import org.quartz.JobExecutionContext; 21 import org.quartz.JobExecutionException; 22 23 28 public class ServiceMixJob implements Job { 29 public void execute(JobExecutionContext context) throws JobExecutionException { 30 QuartzComponent component = (QuartzComponent) context.getJobDetail().getJobDataMap().get(QuartzComponent.COMPONENT_KEY); 31 if (component == null) { 32 throw new JobExecutionException("No quartz JBI component available for key: " + QuartzComponent.COMPONENT_KEY + ". Bad job data map"); 33 } 34 component.onJobExecute(context); 35 } 36 } 37 | Popular Tags |