Job job;
try {
String jobType = jobDescriptor.getJobType();
if (jobType == null || jobType.length() == 0) {
/*throw an exception when job name is null or empty*/
throw new JobExecutionException (
String.format("The 'type' parameter for job[%s] is null or empty", jobDescriptor));
}
Class<? extends Object> executorClass = _jobToClass.get(jobType);
if (executorClass == null) {
throw new JobExecutionException(
String.format(
"Could not construct job[%s] of type[%s].",
jobDescriptor,
jobType
));