JdbcCursorItemReader - Connection
Hi All,
I have a batch that contain one master job with a tasklet step. Inside the tasklet I will register the job (Considering as child job) and then launch it.
I don't have any issue in the configuration and running batch, But even though child processing completed successfully the Connection still exists.
If i check the sql server 2005 activity moniter, there is 2 processes is running.
<code>
-- Master Job
<job id="Batch_ControllerJob"
restartable="true" xmlns="http://www.springframework.org/schema/batch">
<step id="BatchExecutor" >
<tasklet ref="batchExecutor" transaction-manager="transactionManager" />
</step>
</job>
</code>
From the batchExecutor I will call the child Job in a new thread.
<code>
-- Child job
<job id="Step_List_Item_ControllerJob" restartable="true" xmlns="http://www.springframework.org/schema/batch">
<step id="Run_Task_List_Item_ControllerStep">
<tasklet>
<chunk reader="stepListQueryReader" processor="stepListItemProcessor"
writer="stepListItemWriter" commit-interval="10" />
</tasklet>
</step>
</job>
<bean id="stepListQueryReader"
class="org.springframework.batch.item.database.Jdb cCursorItemReader"
scope="step">
<property name="dataSource" ref="dataSource" />
<property name="rowMapper">
<bean class="batch.core.mapper.StepListRowMapper" />
</property>
<property name="sql" ref="#{jobParameters['stepName']}" />
</bean>
</code>
Once the child job (Step_List_Item_ControllerJob) is finished processing, the stepListQueryReader's cursor should close the connection?
I have missed any configuration?
Thanks for your response in advance
Thanks & Regards,
Arun Duraisamy