BATCH-220:Moved SimpleJob (formerly simpleTaskletJob) to use the ChunkedStep

This commit is contained in:
lucasward
2008-02-14 22:19:28 +00:00
parent 600c68aa02
commit 5e8a9a57d0
4 changed files with 270 additions and 259 deletions

View File

@@ -10,10 +10,10 @@
<bean parent="stepScope"/>
<bean parent="jobConfigurationRegistryBeanPostProcessor"/>
<bean id="simpleTaskletJob" parent="simpleJob">
<bean id="simpleJob" parent="simpleJob">
<property name="steps">
<list>
<bean id="step1" parent="simpleStep">
<bean id="step1" parent="chunkedStep">
<property name="itemReader" ref="fileItemReader" />
<property name="itemWriter">
<bean
@@ -21,7 +21,7 @@
<property name="tradeDao" ref="tradeDao" />
</bean>
</property>
<property name="commitInterval" value="2" />
<property name="chunkSize" value="2" />
</bean>
</list>
</property>

View File

@@ -100,9 +100,11 @@
<property name="saveExecutionAttributes" value="true" />
</bean>
<bean id="abstractStep" class="org.springframework.batch.execution.step.simple.SimpleStep"
abstract="true" parent="taskletStep">
<bean id="abstractStep" class="org.springframework.batch.execution.step.simple.SimpleStep" abstract="true">
<property name="transactionManager" ref="transactionManager" />
<property name="jobRepository" ref="jobRepository" />
<property name="allowStartIfComplete" value="true" />
<property name="saveExecutionAttributes" value="true" />
</bean>
<bean id="simpleStep" parent="abstractStep"
@@ -116,7 +118,18 @@
</property>
<property name="commitInterval" value="1" />
</bean>
<bean id="chunkedStep" class="org.springframework.batch.execution.step.simple.ChunkedStep" abstract="true">
<property name="allowStartIfComplete" value="true" />
<property name="saveExecutionAttributes" value="true" />
<property name="jobRepository" ref="jobRepository" />
<property name="streamManager">
<bean class="org.springframework.batch.item.stream.SimpleStreamManager">
<constructor-arg ref="transactionManager" />
</bean>
</property>
</bean>
<bean id="repeatOperationsStep" parent="abstractStep"
class="org.springframework.batch.execution.step.simple.RepeatOperationsStep"
abstract="true">

View File

@@ -20,10 +20,10 @@ package org.springframework.batch.sample;
* This job differs from FixedLengthImportJob only in internal job, therefore
* the test is reused, only the job config location is overridden
*/
public class SimpleTaskletJobFunctionalTests extends FixedLengthImportJobFunctionalTests {
public class SimpleJobFunctionalTests extends FixedLengthImportJobFunctionalTests {
protected String[] getConfigLocations() {
return new String[]{"jobs/simpleTaskletJob.xml"};
return new String[]{"jobs/simpleJob.xml"};
}
}