}
String endpointName = (String) context.getJobDetail().getJobDataMap().get(ENDPOINT_NAME);
if (endpointName == null) {
throw new JobExecutionException("No property '" + ENDPOINT_NAME + "' defined. Bad job data map");
}
QuartzEndpoint endpoint = (QuartzEndpoint) component.getRegistry().getEndpoint(endpointName);
if (endpoint == null) {
throw new JobExecutionException("No quartz JBI endpoint available for key: " + endpointName + ". Bad job data map");
}
endpoint.onJobExecute(context);
} catch (SchedulerException e) {
throw new JobExecutionException(e);
}
}