public String abandon(Model model, @ModelAttribute("stopRequest") StopRequest stopRequest, Errors errors,
@PathVariable Long jobExecutionId) {
stopRequest.jobExecutionId = jobExecutionId;
try {
JobExecution jobExecution = jobService.abandon(jobExecutionId);
model.addAttribute(new JobExecutionInfo(jobExecution, timeZone));
}
catch (NoSuchJobExecutionException e) {
errors.reject("no.such.job.execution", new Object[] { jobExecutionId }, "No job exection with id="
+ jobExecutionId);
}
catch (JobExecutionAlreadyRunningException e) {
errors.reject("job.execution.running", "Job exection with id=" + jobExecutionId + " is running.");
JobExecution jobExecution;
try {
jobExecution = jobService.getJobExecution(jobExecutionId);
model.addAttribute(new JobExecutionInfo(jobExecution, timeZone));
}
catch (NoSuchJobExecutionException e1) {