OPEN - issue BATCH-429: Combine the core and execution modules
http://jira.springframework.org/browse/BATCH-429 Remove cycle from commandline runner (it didn't need an exception classifier)
This commit is contained in:
@@ -24,9 +24,8 @@ import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.configuration.JobLocator;
|
||||
import org.springframework.batch.core.launch.JobLauncher;
|
||||
import org.springframework.batch.core.runtime.ExitStatusExceptionClassifier;
|
||||
import org.springframework.batch.core.runtime.JobParametersFactory;
|
||||
import org.springframework.batch.core.step.support.SimpleExitStatusExceptionClassifier;
|
||||
import org.springframework.batch.repeat.ExitStatus;
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -121,8 +120,6 @@ public class CommandLineJobRunner {
|
||||
|
||||
private ExitCodeMapper exitCodeMapper = new SimpleJvmExitCodeMapper();
|
||||
|
||||
private ExitStatusExceptionClassifier exceptionClassifier = new SimpleExitStatusExceptionClassifier();
|
||||
|
||||
private JobLauncher launcher;
|
||||
|
||||
private JobLocator jobLocator;
|
||||
@@ -141,16 +138,6 @@ public class CommandLineJobRunner {
|
||||
this.launcher = launcher;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection setter for the {@link ExitStatusExceptionClassifier}
|
||||
*
|
||||
* @param exceptionClassifier
|
||||
*/
|
||||
public void setExceptionClassifier(
|
||||
ExitStatusExceptionClassifier exceptionClassifier) {
|
||||
this.exceptionClassifier = exceptionClassifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection setter for the {@link JvmExitCodeMapper}.
|
||||
*
|
||||
@@ -211,8 +198,7 @@ public class CommandLineJobRunner {
|
||||
.getExitCode());
|
||||
} catch (Throwable e) {
|
||||
logger.error("Job Terminated in error:", e);
|
||||
return exitCodeMapper.getExitCode(exceptionClassifier
|
||||
.classifyForExitCode(e).getExitCode());
|
||||
return exitCodeMapper.getExitCode(ExitStatus.FAILED.getExitCode());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user