try {
// Deserialize and retrieve GridJob
profile.setJob(getGridJobInstance(owner, classData, archive, classLoader));
} catch (Exception e) {
log.warn("[JobService] Unable to de-serialize Job", e);
throw new GridJobRejectionException("Unable to de-serialize Job", e);
}
synchronized (this) {
// Insert GridJob to active jobs map
this.jobs.put(jobId, profile);
}
if (resultCallbackQueue != null) {
ResultCallback proxy = jmsSupport.createResultCallbackProxy(jobId, resultCallbackQueue);
profile.setResultCallback(proxy);
}
if (archive != null) {
// If Job has a GridArchive, verify integrity
if (!verifyArchive(archive))
throw new GridJobRejectionException(
"Archive verification failed");
// Put Archive into GridJobProfile
profile.setArchive(archive);
}
if (!startGridJob(profile, classLoader)) {
// Unsupported Type
throw new GridJobRejectionException("GridJob Type Not Supported : "
+ profile.getJob().getClass().getName());
}
// Track to see if Job Submitter Node Fails
stopIfNodeFails(owner, jobId);