IN PROGRESS - issue BATCH-159: JobExecutor should return a JobExecution (which itself contains the ExitStatus)

http://opensource.atlassian.com/projects/spring/browse/BATCH-159

Merged JobLauncher implementations together and separated out thread interruption and JMX notification responsibilities to separate collaborators.
This commit is contained in:
dsyer
2007-10-24 17:35:15 +00:00
parent 5b2b92da18
commit 9495bf24fd
2 changed files with 16 additions and 3 deletions

View File

@@ -11,7 +11,20 @@
<bean class="org.springframework.batch.execution.configuration.JobConfigurationRegistryBeanPostProcessor">
<property name="jobConfigurationRegistry" ref="jobConfigurationRegistry"/>
</bean>
</bean>
<!-- Override the default jobExecutorFacade to provide a listener that can interrupt the job -->
<bean id="jobExecutorFacade" class="org.springframework.batch.execution.facade.SimpleJobExecutorFacade">
<property name="jobRepository" ref="simpleJobRepository" />
<property name="jobConfigurationLocator" ref="jobConfigurationRegistry"/>
<property name="jobExecutor" ref="jobExecutor" />
<property name="jobExecutionListeners">
<list>
<bean class="org.springframework.batch.execution.bootstrap.support.ThreadInterruptJobExecutionListener"/>
</list>
</property>
</bean>
<bean id="jobConfiguration" parent="simpleJob">
<property name="steps">

View File

@@ -32,8 +32,8 @@ public abstract class AbstractBatchLauncherTests extends AbstractDependencyInjec
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";
System.arraycopy(locations, 0, allLocations, 1, locations.length);
allLocations[0] = "simple-container-definition.xml";
return super.createApplicationContext(allLocations);
}