Examples of DuplicateJobException


Examples of org.springframework.batch.core.configuration.DuplicateJobException

    for (Step step : steps) {
      jobSteps.put(step.getName(), step);
    }
    final Object previousValue = map.putIfAbsent(jobName, jobSteps);
    if (previousValue != null) {
      throw new DuplicateJobException("A job configuration with this name [" + jobName
          + "] was already registered");
    }
  }
View Full Code Here

Examples of org.springframework.batch.core.configuration.DuplicateJobException

    Assert.notNull(jobFactory);
    String name = jobFactory.getJobName();
    Assert.notNull(name, "Job configuration must have a name.");
    JobFactory previousValue = map.putIfAbsent(name, jobFactory);
    if (previousValue != null) {
      throw new DuplicateJobException("A job configuration with this name [" + name
          + "] was already registered");
    }
  }
View Full Code Here

Examples of org.springframework.batch.core.configuration.DuplicateJobException

    private Map<Long, Job> registry = new ConcurrentHashMap<Long, Job>();

    public void register(Job job, org.springframework.batch.core.JobExecution jobExecution) throws DuplicateJobException {

      if(registry.containsKey(jobExecution.getId())) {
        throw new DuplicateJobException("This job execution has already been registered");
      } else {
        registry.put(jobExecution.getId(), job);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.