From 8833158f0d5fbf456e31669dac51a7ff42b684a4 Mon Sep 17 00:00:00 2001 From: dsyer Date: Wed, 23 Jan 2008 12:23:27 +0000 Subject: [PATCH] Remove duplicate job name (causing failures in test suite) --- .../repository/SimpleJobRepository.java | 137 ++++++++---------- .../io/file/DefaultFlatFileItemReader.java | 1 + .../io/file/SimpleFlatFileItemReader.java | 7 + .../io/file/separator/ResourceLineReader.java | 1 - spring-batch-samples/.project | 64 ++++---- .../.settings/org.eclipse.jdt.core.prefs | 5 - .../sample/advice/ProcessorLogAdvice.java | 6 +- .../src/main/resources/jobs/parallelJob.xml | 2 +- .../src/main/resources/log4j.properties | 1 + .../resources/simple-container-definition.xml | 10 +- 10 files changed, 113 insertions(+), 121 deletions(-) delete mode 100644 spring-batch-samples/.settings/org.eclipse.jdt.core.prefs diff --git a/spring-batch-execution/src/main/java/org/springframework/batch/execution/repository/SimpleJobRepository.java b/spring-batch-execution/src/main/java/org/springframework/batch/execution/repository/SimpleJobRepository.java index 4e785956c..edf7aa2bf 100644 --- a/spring-batch-execution/src/main/java/org/springframework/batch/execution/repository/SimpleJobRepository.java +++ b/spring-batch-execution/src/main/java/org/springframework/batch/execution/repository/SimpleJobRepository.java @@ -58,6 +58,13 @@ public class SimpleJobRepository implements JobRepository { private StepDao stepDao; + /** + * Provide default constructor with low visibility in case user wants to use + * use aop:proxy-target-class="true" for transaction interceptor. + */ + SimpleJobRepository() { + } + public SimpleJobRepository(JobDao jobDao, StepDao stepDao) { super(); this.jobDao = jobDao; @@ -67,19 +74,18 @@ public class SimpleJobRepository implements JobRepository { /** *

* Create a (@link {@link JobExecution}) based on the passed in - * {@link JobIdentifier} and {@link Job}. However, unique - * identification of a job can only come from the database, and therefore - * must come from JobDao by either creating a new job or finding an existing - * one, which will ensure that the id of the job is populated with the - * correct value. + * {@link JobIdentifier} and {@link Job}. However, unique identification of + * a job can only come from the database, and therefore must come from + * JobDao by either creating a new job or finding an existing one, which + * will ensure that the id of the job is populated with the correct value. *

* *

* There are two ways in which the method determines if a job should be * created or an existing one should be returned. The first is - * restartability. The {@link Job} restartable property will be - * checked first. If it is not false, a new job will be created, regardless - * of whether or not one exists. If it is true, the {@link JobDao} will be + * restartability. The {@link Job} restartable property will be checked + * first. If it is not false, a new job will be created, regardless of + * whether or not one exists. If it is true, the {@link JobDao} will be * checked to determine if the job already exists, if it does, it's steps * will be populated (there must be at least 1) and a new * {@link JobExecution} will be returned. If no job is found, a new one will @@ -95,11 +101,11 @@ public class SimpleJobRepository implements JobRepository { *

  • What happens then depends on how many existing job instances we * find: *