IN PROGRESS - issue BATCH-7: Remove transaction synchronization and state management from input/output sources (formerly buffering)
http://jira.springframework.org/browse/BATCH-7 Lazy-initialisation solution to the "who's in step scope" issue
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
<bean id="playerload" parent="simpleStep">
|
||||
<property name="commitInterval" value="1"></property>
|
||||
<property name="startLimit" value="100" />
|
||||
<property name="saveRestartData" value="true" />
|
||||
<property name="allowStartIfComplete" value="false" />
|
||||
<property name="tasklet">
|
||||
<bean
|
||||
@@ -44,7 +43,6 @@
|
||||
<bean id="gameLoad" parent="simpleStep">
|
||||
<property name="commitInterval" value="1" />
|
||||
<property name="startLimit" value="100" />
|
||||
<property name="saveRestartData" value="true" />
|
||||
<property name="tasklet">
|
||||
<bean
|
||||
class="org.springframework.batch.execution.tasklet.RestartableItemOrientedTasklet">
|
||||
@@ -63,7 +61,6 @@
|
||||
<bean id="playerSummarization" parent="simpleStep">
|
||||
<property name="commitInterval" value="1" />
|
||||
<property name="startLimit" value="100" />
|
||||
<property name="saveRestartData" value="true" />
|
||||
<property name="tasklet">
|
||||
<bean
|
||||
class="org.springframework.batch.execution.tasklet.RestartableItemOrientedTasklet">
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</property>
|
||||
<property name="commitInterval" value="2" />
|
||||
<property name="startLimit" value="100" />
|
||||
<property name="saveRestartData" value="true" />
|
||||
<property name="saveStreamContext" value="true" />
|
||||
<property name="allowStartIfComplete" value="false" />
|
||||
</bean>
|
||||
<bean id="loading" parent="repeatOperationsStep">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<bean class="org.springframework.batch.sample.tasklet.ExceptionRestartableTasklet">
|
||||
<property name="itemReader">
|
||||
<bean
|
||||
class="org.springframework.batch.item.reader.ValidatingItemReader">
|
||||
class="org.springframework.batch.item.reader.ValidatingItemReader" scope="step">
|
||||
<property name="itemReader" ref="fileItemReader" />
|
||||
<property name="validator" ref="fixedValidator" />
|
||||
</bean>
|
||||
@@ -31,7 +31,7 @@
|
||||
</bean>
|
||||
</property>
|
||||
<property name="commitInterval" value="2" />
|
||||
<property name="saveRestartData" value="true"/>
|
||||
<property name="saveStreamContext" value="true"/>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<property name="jobRepository" ref="jobRepository" />
|
||||
<property name="transactionManager" ref="transactionManager" />
|
||||
<property name="allowStartIfComplete" value="true" />
|
||||
<property name="saveRestartData" value="false" />
|
||||
<property name="saveStreamContext" value="false" />
|
||||
</bean>
|
||||
|
||||
<bean id="simpleStep" parent="abstractStep"
|
||||
@@ -101,13 +101,14 @@
|
||||
</bean>
|
||||
</property>
|
||||
<property name="commitInterval" value="1" />
|
||||
<property name="saveStreamContext" value="true" />
|
||||
</bean>
|
||||
|
||||
<bean id="repeatOperationsStep" parent="abstractStep"
|
||||
class="org.springframework.batch.execution.step.simple.RepeatOperationsStep"
|
||||
abstract="true">
|
||||
<property name="allowStartIfComplete" value="true" />
|
||||
<property name="saveRestartData" value="false" />
|
||||
<property name="saveStreamContext" value="false" />
|
||||
<property name="jobRepository" ref="jobRepository" />
|
||||
<property name="transactionManager" ref="transactionManager" />
|
||||
</bean>
|
||||
|
||||
@@ -75,7 +75,7 @@ public class RestartFunctionalTests extends AbstractBatchLauncherTests {
|
||||
}
|
||||
|
||||
int medium = jdbcTemplate.queryForInt("SELECT COUNT(*) FROM TRADE");
|
||||
// assert based on commit inyerval = 2
|
||||
// assert based on commit interval = 2
|
||||
assertEquals(before+2, medium);
|
||||
|
||||
runJob();
|
||||
|
||||
Reference in New Issue
Block a user