OPEN - issue BATCH-378: RepeatListener is confusing and too generic to use for 'intercepting' a step

http://jira.springframework.org/browse/BATCH-378

Fix hibernate aware item writer - no need for listener interface now that ItemWRiter has flush/clear
This commit is contained in:
dsyer
2008-02-29 16:15:52 +00:00
parent b1ae2efaae
commit e5f4413101
10 changed files with 453 additions and 217 deletions

View File

@@ -34,7 +34,4 @@ public class CustomerCreditIncreaseWriter extends AbstractItemWriter {
customerCreditDao.writeCredit(customerCredit);
}
public void close() throws Exception {
}
}

View File

@@ -10,29 +10,23 @@
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<description>Example for Hibernate integration.</description>
<import resource="../simple-container-definition.xml" />
<import resource="../simple-container-definition.xml" />
<bean id="hibernateJob" parent="simpleJob">
<!-- set restartable=false so that this job can be used by more than one test -->
<property name="restartable" value="false" />
<property name="steps">
<bean id="step1" parent="simpleStep">
<property name="itemReader" ref="hibernateItemReader" />
<property name="itemReader" ref="hibernateItemReader" />
<property name="itemWriter" ref="hibernateOutputSource" />
<property name="commitInterval" value="3" />
<property name="itemSkipPolicy">
<bean class="org.springframework.batch.execution.step.support.AlwaysSkipItemSkipPolicy"/>
</property>
<property name="chunkOperations">
<bean
class="org.springframework.batch.repeat.support.RepeatTemplate">
<property name="listeners"
ref="hibernateOutputSource" />
</bean>
class="org.springframework.batch.execution.step.support.AlwaysSkipItemSkipPolicy" />
</property>
</bean>
</property>
</bean>