BATCH-1343:Reverted previous change

This commit is contained in:
lucasward
2009-11-26 05:45:53 +00:00
parent d0ae07946e
commit 2cced977ec
2 changed files with 8 additions and 4 deletions

View File

@@ -17,9 +17,11 @@ package org.springframework.batch.core.launch;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionException;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersInvalidException;
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException;
import org.springframework.batch.core.repository.JobRestartException;
/**
* Simple interface for controlling jobs, including possible ad-hoc executions,
@@ -59,6 +61,7 @@ public interface JobLauncher {
* @throws JobParametersInvalidException if the parameters are not valid for
* this job
*/
public JobExecution run(Job job, JobParameters jobParameters) throws JobExecutionException;
public JobExecution run(Job job, JobParameters jobParameters) throws JobExecutionAlreadyRunningException,
JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException;
}

View File

@@ -21,11 +21,11 @@ import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionException;
import org.springframework.batch.core.JobInstance;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersInvalidException;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.repository.JobRestartException;
@@ -81,7 +81,8 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean {
* @throws JobParametersInvalidException
*/
public JobExecution run(final Job job, final JobParameters jobParameters)
throws JobExecutionException {
throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException,
JobParametersInvalidException {
Assert.notNull(job, "The Job must not be null.");
Assert.notNull(jobParameters, "The JobParameters must not be null.");