Package org.springframework.batch.core.launch

Examples of org.springframework.batch.core.launch.NoSuchJobExecutionException


  @Override
  public Collection<StepExecution> getStepExecutions(Long jobExecutionId) throws NoSuchJobExecutionException {

    JobExecution jobExecution = jobExecutionDao.getJobExecution(jobExecutionId);
    if (jobExecution == null) {
      throw new NoSuchJobExecutionException("No JobExecution with id=" + jobExecutionId);
    }

    stepExecutionDao.addStepExecutions(jobExecution);

    String jobName = jobExecution.getJobInstance() == null ? jobInstanceDao.getJobInstance(jobExecution).getJobName() : jobExecution.getJobInstance().getJobName();
View Full Code Here


  @Override
  public JobExecution getJobExecution(Long jobExecutionId) throws NoSuchJobExecutionException {
    JobExecution jobExecution = jobExecutionDao.getJobExecution(jobExecutionId);
    if (jobExecution == null) {
      throw new NoSuchJobExecutionException("There is no JobExecution with id=" + jobExecutionId);
    }
    jobExecution.setJobInstance(jobInstanceDao.getJobInstance(jobExecution));
    try {
      jobExecution.setExecutionContext(executionContextDao.getExecutionContext(jobExecution));
    }
View Full Code Here

  private JobExecution findExecutionById(long executionId) throws NoSuchJobExecutionException {
    JobExecution jobExecution = jobExplorer.getJobExecution(executionId);

    if (jobExecution == null) {
      throw new NoSuchJobExecutionException("No JobExecution found for id: [" + executionId + "]");
    }
    return jobExecution;

  }
View Full Code Here

    final List<StepExecution> stepExecutions2 = new ArrayList<StepExecution>();
    stepExecutions2.add(step2);
    jobExecution1.addStepExecutions(stepExecutions1);

    when(jobService.getStepExecutions(5555L)).thenThrow(
        new NoSuchJobExecutionException("No JobExecution with id=5555L"));
    when(jobService.getStepExecutions(2L)).thenReturn(stepExecutions1);

    when(jobService.getStepExecution(2L, 1L)).thenReturn(step1);
    when(jobService.getStepExecution(5555L, 1L)).thenThrow(
        new NoSuchJobExecutionException("No JobExecution with id=5555L"));
    when(jobService.getStepExecution(2L, 5555L)).thenThrow(
        new NoSuchStepExecutionException("No StepExecution with id=5555L"));
    when(jobService.countStepExecutionsForStep(job1.getName(), step1.getStepName())).thenReturn(1);
    when(jobService.listStepExecutionsForStep(job1.getName(), step1.getStepName(), 0, 1000)).thenReturn(
        stepExecutions2);
View Full Code Here

    when(jobService.listJobExecutions(5, 5)).thenReturn(jobExecutions1);
    when(jobService.listJobExecutions(0, 20)).thenReturn(jobExecutions1);
    when(jobService.listJobExecutionsForJob(job2.getName(), 0, 20)).thenReturn(jobExecutions2);
    when(jobService.getJobExecution(jobExecution1.getId())).thenReturn(jobExecution1);
    when(jobService.getJobExecution(99999L)).thenThrow(new NoSuchJobExecutionException("Not found."));

    when(jobService.stop(3l)).thenThrow(JobExecutionNotRunningException.class);
    when(jobService.stop(5l)).thenThrow(NoSuchJobExecutionException.class);
    when(jobService.getJobExecution(1234l)).thenThrow(NoSuchJobExecutionException.class);
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.launch.NoSuchJobExecutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.