RESOLVED - issue BATCH-94: Sample jobs should not import "simple-container-definition.xml"
http://opensource.atlassian.com/projects/spring/browse/BATCH-94
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
|
||||
</bean>
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
|
||||
</bean>
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
|
||||
</bean>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
<!-- The module used in this job will run in an infinite loop. This is useful for testing graceful shutdown from
|
||||
multiple environments. -->
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
|
||||
</bean>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
|
||||
</bean>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<import resource="multilineOrderInputDescriptors.xml" />
|
||||
<import resource="multilineOrderOutputDescriptors.xml" />
|
||||
<import resource="multilineOrderIo.xml" />
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean
|
||||
class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
|
||||
</bean>
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
|
||||
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
|
||||
</bean>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<import resource="tradeJobIo.xml" />
|
||||
<!--import resource="tradeJobAop.xml" /-->
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
|
||||
|
||||
<import resource="../simple-container-definition.xml" />
|
||||
|
||||
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
|
||||
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
|
||||
|
||||
@@ -17,6 +17,7 @@ package org.springframework.batch.sample;
|
||||
|
||||
import org.springframework.batch.core.configuration.JobConfiguration;
|
||||
import org.springframework.batch.execution.bootstrap.SynchronousJobLauncher;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
|
||||
|
||||
/**
|
||||
@@ -27,6 +28,14 @@ public abstract class AbstractBatchLauncherTests extends AbstractDependencyInjec
|
||||
|
||||
protected SynchronousJobLauncher launcher;
|
||||
private JobConfiguration jobConfiguration;
|
||||
|
||||
protected ConfigurableApplicationContext createApplicationContext(
|
||||
String[] locations) {
|
||||
String[] allLocations = new String[locations.length+1];
|
||||
System.arraycopy(locations, 0, allLocations, 0, locations.length);
|
||||
allLocations[locations.length] = "simple-container-definition.xml";
|
||||
return super.createApplicationContext(allLocations);
|
||||
}
|
||||
|
||||
/**
|
||||
* Subclasses can provide name of job to run. We guess it by looking at the
|
||||
|
||||
Reference in New Issue
Block a user