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:
@@ -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">
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user