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: *