BATCH-220:Moved SimpleJob (formerly simpleTaskletJob) to use the ChunkedStep
This commit is contained in:
@@ -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>
|
||||
@@ -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">
|
||||
|
||||
@@ -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"};
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user