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);