Package org.springframework.batch.core.launch

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


    List<JobInstance> jobInstances = jobExplorer.getJobInstances(jobName, start, count);
    for (JobInstance jobInstance : jobInstances) {
      list.add(jobInstance.getId());
    }
    if (list.isEmpty() && !jobRegistry.getJobNames().contains(jobName)) {
      throw new NoSuchJobException("No such job (either in registry or in historical data): " + jobName);
    }
    return list;
  }
View Full Code Here


    Set<Long> set = new LinkedHashSet<Long>();
    for (JobExecution jobExecution : jobExplorer.findRunningJobExecutions(jobName)) {
      set.add(jobExecution.getId());
    }
    if (set.isEmpty() && !jobRegistry.getJobNames().contains(jobName)) {
      throw new NoSuchJobException("No such job (either in registry or in historical data): " + jobName);
    }
    return set;
  }
View Full Code Here

   * @return Job a simple batch job consisting of its step names.
   */
  @Override
  public Job getJob(final String name) throws NoSuchJobException {
    if (!getJobNames().contains(name)) {
      throw new NoSuchJobException(name);
    }
    // Return a simple job that currently supports
    // - Get job name
    // - Get step names of the given job
    SimpleJob job = new SimpleJob(name) {
View Full Code Here

    when(jobService.getJobExecutionsForJobInstance(jobInstance1.getJobName(), jobInstance1.getInstanceId())).thenReturn(
        jobExecutions2);
    when(jobService.getJobInstance(100)).thenThrow(new NoSuchBatchJobInstanceException(100));
    when(jobService.getJobInstance(101)).thenReturn(jobInstance2);
    when(jobService.getJobExecutionsForJobInstance("job2", jobInstance2.getInstanceId())).thenThrow(
        new NoSuchJobException("job2"));
  }
View Full Code Here

TOP

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

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.