throw new JobExecutionNotRunningException("JobExecution must be running so that it can be stopped: "+jobExecution);
@Override public final JobExecutionNotRunningException jobExecutionNotRunningException(final long jobExecutionId, final BatchStatus batchStatus) { final JobExecutionNotRunningException result = new JobExecutionNotRunningException(String.format(getLoggingLocale(), jobExecutionNotRunningException$str(), jobExecutionId, batchStatus)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String stepReachedStartLimit = "JBERET000613: The step %s has started %s times and reached its start limit %s";
@Override public void stopJob(final long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException { final ThreadRootController controller = this.executionId2jobControllerMap.get(executionId); if (controller == null) { throw new JobExecutionNotRunningException("JobExecution with execution id of " + executionId + "is not running."); } controller.stop(); }
@Override public void stopJob(long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException { IThreadRootController controller = this.executionId2jobControllerMap.get(executionId); if (controller == null) { String msg = "JobExecution with execution id of " + executionId + "is not running."; logger.warning("stopJob(): " + msg); throw new JobExecutionNotRunningException(msg); } controller.stop(); }
@Override public void stopJob(long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException { IThreadRootController controller = this.executionId2jobControllerMap.get(executionId); if (controller == null) { String msg = "JobExecution with execution id of " + executionId + "is not running."; logger.warning("stopJob(): " + msg); throw new JobExecutionNotRunningException(msg); } controller.stop(); }
@Override public void stopJob(long jobExecutionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException { // Needs revisting once we have remote subjobs, we could only have subjobs of a given TLJ // running in this JVM BatchJobWorkUnit jobWorkUnit = executingJobs.get(jobExecutionId); if (jobWorkUnit == null) { String msg = "JobExecution with execution id of " + jobExecutionId + " is not running."; throw new JobExecutionNotRunningException(msg); } stopWorkUnit(jobWorkUnit); // Needs revisting once we have remote subjobs, we could only have subjobs of a given TLJ // running in this JVM // Just remove, don't try stopping directly. Let the stop of the top-level job drill down // and stop the right executing step. // // So what is the point of even having this set? To set up for the remote subjob case I suppose. }
@Override public void stop() { StopLock stopLock = getStopLock(); // Store in local variable to facilitate Ctrl+Shift+G search in Eclipse synchronized (stopLock) { BatchStatus batchStatus = runtimeWorkUnitExecution.getBatchStatus(); // We don't want to overwrite a FAILED with a STOPPED switch (batchStatus) { case STARTING: case STARTED: batchStatusStopping(); if (transitioner != null) { IController stoppableElementController = transitioner.getCurrentStoppableElementController(); if (stoppableElementController != null) { stoppableElementController.stop(); } } break; case ABANDONED: case COMPLETED: case FAILED: case STOPPED: logger.fine("Stop unsuccessful since batch status for job is already set to: " + batchStatus); throw new JobExecutionNotRunningException(); case STOPPING: //Possibly still running. default: logger.fine("Stop ignored since batch status for job is already set to: " + batchStatus); } } }
throw new JobExecutionNotRunningException("JobExecution must be running so that it can be stopped: "+jobExecution);
throw new JobExecutionNotRunningException("JobExecution must be running so that it can be stopped: "+jobExecution);
throw new JobExecutionNotRunningException("JobExecution must be running so that it can be stopped: "+jobExecution);