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:
dsyer
2007-08-21 13:53:07 +00:00
parent 62e0fa1f11
commit 3415f08ff4
11 changed files with 9 additions and 20 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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">

View File

@@ -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>

View File

@@ -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>

View File

@@ -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" /-->

View File

@@ -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"/>

View File

@@ -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