Yes the 'throttleLimit' is not working only with my code.
My 'tweaks' are limited to changing only the SQL query and am attaching the file. In the writer, I am making a webservice call.
These are the things I noticed while testing:
1. I believe that task executor creates as many 'reader' thread as throttleLimit. All the threads that read the object from the DB are completing the writer method call.
2. throttleLimit greater than 8 is failing.
3. The threads are hanging even If I do nothing in the writer (I just placed logger statements in the write). Hence I guess writer is not introducing the problem.
Please let me know, if you need any other details in helping me solve this.
Thanks
Code:
<bean id="simpleStep" class="org.springframework.batch.core.step.item.SimpleStepFactoryBean"
abstract="true">
<property name="transactionManager" ref="transactionManager" />
<property name="jobRepository" ref="mapJobRepository" />
<property name="startLimit" value="100" />
<property name="commitInterval" value="1" />
</bean>
<bean id="loading" parent="simpleStep">
<property name="throttleLimit" value="8"/>
<property name="taskExecutor">
.....................