JobLauncher interface change
This commit is contained in:
@@ -1 +1 @@
|
||||
<?xml version='1.0' encoding='utf-8'?><purchaseOrders xsi:schemaLocation="http://adsj.accenture.com/purchaseorders purchaseorders.xsd" xmlns="http://adsj.accenture.com/purchaseorders" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><order><customer><name>Gladys Kravitz</name><address>Anytown, PA</address><age>34</age><moo>0</moo><poo>0</poo></customer><date>2003-01-07 08:16:00.0 CST</date><lineItems><lineItem><description>Burnham's Celestial Handbook, Vol 1</description><perUnitOunces>5.0</perUnitOunces><price>21.79</price><quantity>2</quantity></lineItem><lineItem><description>Burnham's Celestial Handbook, Vol 2</description><perUnitOunces>5.0</perUnitOunces><price>19.89</price><quantity>2</quantity></lineItem></lineItems></order><order><customer><name>John Smith</name><address>Chicago, IL</address><age>46</age><moo>0</moo><poo>0</poo></customer><date>2003-01-07 08:16:02.0 CST</date><lineItems><lineItem><description>XmlBeans in Action</description><perUnitOunces>3.0</perUnitOunces><price>41.29</price><quantity>1</quantity></lineItem><lineItem><description>JSR-173</description><perUnitOunces>1.0</perUnitOunces><price>11.99</price><quantity>5</quantity></lineItem><lineItem><description>Teach Yourself XML in 21 days</description><perUnitOunces>1.0</perUnitOunces><price>35.49</price><quantity>1</quantity></lineItem></lineItems></order><order><customer><name>Peter Newman</name><address>Cleveland, OH</address><age>23</age><moo>0</moo><poo>0</poo></customer><date>2003-01-07 08:16:35.0 CST</date><lineItems><lineItem><description>Java 6</description><perUnitOunces>2.0</perUnitOunces><price>12.79</price><quantity>3</quantity></lineItem></lineItems></order></purchaseOrders>
|
||||
<?xml version="1.0" ?><purchaseOrders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://adsj.accenture.com/purchaseorders" xsi:schemaLocation="http://adsj.accenture.com/purchaseorders purchaseorders.xsd"><order><customer><name>Gladys Kravitz</name><address>Anytown, PA</address><age>34</age><moo>0</moo><poo>0</poo></customer><date>2003-01-07 14:16:00.0 GMT</date><lineItems><lineItem><description>Burnham's Celestial Handbook, Vol 1</description><perUnitOunces>5.0</perUnitOunces><price>21.79</price><quantity>2</quantity></lineItem><lineItem><description>Burnham's Celestial Handbook, Vol 2</description><perUnitOunces>5.0</perUnitOunces><price>19.89</price><quantity>2</quantity></lineItem></lineItems></order><order><customer><name>John Smith</name><address>Chicago, IL</address><age>46</age><moo>0</moo><poo>0</poo></customer><date>2003-01-07 14:16:02.0 GMT</date><lineItems><lineItem><description>XmlBeans in Action</description><perUnitOunces>3.0</perUnitOunces><price>41.29</price><quantity>1</quantity></lineItem><lineItem><description>JSR-173</description><perUnitOunces>1.0</perUnitOunces><price>11.99</price><quantity>5</quantity></lineItem><lineItem><description>Teach Yourself XML in 21 days</description><perUnitOunces>1.0</perUnitOunces><price>35.49</price><quantity>1</quantity></lineItem></lineItems></order><order><customer><name>Peter Newman</name><address>Cleveland, OH</address><age>23</age><moo>0</moo><poo>0</poo></customer><date>2003-01-07 14:16:35.0 GMT</date><lineItems><lineItem><description>Java 6</description><perUnitOunces>2.0</perUnitOunces><price>12.79</price><quantity>3</quantity></lineItem></lineItems></order></purchaseOrders>
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user