/** {@inheritDoc} */
@Override
protected void executeInternal(JobExecutionContext executionContext) throws JobExecutionException {
log.debug("execute: {}", executionContext);
ISchedulingService service = null;
IScheduledJob job = null;
try {
JobDetail jobDetail = executionContext.getJobDetail();
JobDataMap dataMap = jobDetail.getJobDataMap();
service = (ISchedulingService) dataMap.get(SCHEDULING_SERVICE);
job = (IScheduledJob) dataMap.get(SCHEDULED_JOB);
job.execute(service);
} catch (Throwable e) {
if (job == null) {
log.error("Job not found");
} else {
log.error("Job {} execution failed", job.toString(), e);
}
}
}