From ad1fde1b5fd22530baa706f7926acf19fa1f9724 Mon Sep 17 00:00:00 2001 From: dsyer Date: Tue, 21 Aug 2007 16:51:37 +0000 Subject: [PATCH] JobLauncher interface change --- samples/20070122.testStream.xmlFileStep.xml | 2 +- .../AbstractBatchBootstrapSpringContextTests.java | 12 ++++++------ .../batch/sample/AbstractBatchLauncherTests.java | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/samples/20070122.testStream.xmlFileStep.xml b/samples/20070122.testStream.xmlFileStep.xml index e698f4395..be4bf3dd6 100644 --- a/samples/20070122.testStream.xmlFileStep.xml +++ b/samples/20070122.testStream.xmlFileStep.xml @@ -1 +1 @@ -Gladys Kravitz
Anytown, PA
3400
2003-01-07 08:16:00.0 CSTBurnham's Celestial Handbook, Vol 15.021.792Burnham's Celestial Handbook, Vol 25.019.892
John Smith
Chicago, IL
4600
2003-01-07 08:16:02.0 CSTXmlBeans in Action3.041.291JSR-1731.011.995Teach Yourself XML in 21 days1.035.491
Peter Newman
Cleveland, OH
2300
2003-01-07 08:16:35.0 CSTJava 62.012.793
\ No newline at end of file +Gladys Kravitz
Anytown, PA
3400
2003-01-07 14:16:00.0 GMTBurnham's Celestial Handbook, Vol 15.021.792Burnham's Celestial Handbook, Vol 25.019.892
John Smith
Chicago, IL
4600
2003-01-07 14:16:02.0 GMTXmlBeans in Action3.041.291JSR-1731.011.995Teach Yourself XML in 21 days1.035.491
Peter Newman
Cleveland, OH
2300
2003-01-07 14:16:35.0 GMTJava 62.012.793
\ No newline at end of file diff --git a/samples/src/test/java/org/springframework/batch/sample/AbstractBatchBootstrapSpringContextTests.java b/samples/src/test/java/org/springframework/batch/sample/AbstractBatchBootstrapSpringContextTests.java index f0edf5d8a..67a286649 100644 --- a/samples/src/test/java/org/springframework/batch/sample/AbstractBatchBootstrapSpringContextTests.java +++ b/samples/src/test/java/org/springframework/batch/sample/AbstractBatchBootstrapSpringContextTests.java @@ -17,7 +17,7 @@ package org.springframework.batch.sample; import org.springframework.batch.core.configuration.JobConfiguration; -import org.springframework.batch.execution.bootstrap.AbstractJobLauncher; +import org.springframework.batch.execution.bootstrap.JobLauncher; import org.springframework.test.AbstractDependencyInjectionSpringContextTests; /** @@ -35,19 +35,19 @@ public abstract class AbstractBatchBootstrapSpringContextTests extends AbstractD private static final String CONTAINER_DEFINITION_LOCATION = "simple-container-definition.xml"; - AbstractJobLauncher bootstrap; + JobLauncher launcher; JobConfiguration jobConfiguration; protected String[] getConfigLocations() { return new String[]{CONTAINER_DEFINITION_LOCATION, getJobConfigurationContextLocation()}; } - public void testLifecycle(){ - bootstrap.start(); + public void testLifecycle() throws Exception { + launcher.run(); } - public void setBootstrap(AbstractJobLauncher bootstrap){ - this.bootstrap = bootstrap; + public void setLauncher(JobLauncher bootstrap){ + this.launcher = bootstrap; } protected abstract String getJobConfigurationContextLocation(); diff --git a/samples/src/test/java/org/springframework/batch/sample/AbstractBatchLauncherTests.java b/samples/src/test/java/org/springframework/batch/sample/AbstractBatchLauncherTests.java index 73e2d00f9..1a3957545 100644 --- a/samples/src/test/java/org/springframework/batch/sample/AbstractBatchLauncherTests.java +++ b/samples/src/test/java/org/springframework/batch/sample/AbstractBatchLauncherTests.java @@ -16,7 +16,7 @@ package org.springframework.batch.sample; import org.springframework.batch.core.configuration.JobConfiguration; -import org.springframework.batch.execution.bootstrap.SynchronousJobLauncher; +import org.springframework.batch.execution.bootstrap.JobLauncher; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.test.AbstractDependencyInjectionSpringContextTests; @@ -26,7 +26,7 @@ import org.springframework.test.AbstractDependencyInjectionSpringContextTests; */ public abstract class AbstractBatchLauncherTests extends AbstractDependencyInjectionSpringContextTests { - protected SynchronousJobLauncher launcher; + protected JobLauncher launcher; private JobConfiguration jobConfiguration; protected ConfigurableApplicationContext createApplicationContext( @@ -53,11 +53,11 @@ public abstract class AbstractBatchLauncherTests extends AbstractDependencyInjec } /** - * Public setter for the {@link SynchronousJobLauncher} property. + * Public setter for the {@link JobLauncher} property. * * @param launcher the launcher to set */ - public void setLauncher(SynchronousJobLauncher launcher) { + public void setLauncher(JobLauncher launcher) { this.launcher = launcher; }