Shahul,
Here is an example on how to define multiple listeners:
Code:
<bean id="simpleStep" class="org.springframework.batch.core.step.item.SkipLimitStepFactoryBean">
<property name="skipLimit" value="100" />
<property name="commitInterval" value="30" />
<property name="transactionManager" ref="batchTransactionManager" />
<property name="listeners" ref="stepListeners" />
<property name="skippableExceptionClasses" ref="nonFatalExceptions" />
<property name="jobRepository" ref="simpleJobRepository" />
</bean>
<util:list id="stepListeners">
<ref bean="oneStepListener"/>
<ref bean="twoStepListener"/>
<ref bean="threeStepListener"/>
</util:list>
----------------------------------------------------
batchuser,
Can you post your code for "fileOutputItemWriteListener" that does not get called. I suspect that it does not get invoked either because there is some kind of delegation in your ItemWriter (in which case you should delegate calls to afterStep, beforeStep, onErrorInStep as well) or you not implementing "ItemWriteListener" interface to use these:
beforeWrite
afterWrite
onWriteError
----------------------------------------------------
litius
Humans are stateful and mutable beings that have no problems processing many things concurrently and share state with others + they are usually "coupled"