Hi
I am implementing the batch in our project to process huge records from database and I have the below configuration. In this commit-interval is 8, and page size to fetch 10; but regardless of page size it always fetches 8 records at a time. Is it the behaviour or am i missing something in configuration?
Code:<batch:job id="simpleJob" job-repository="jobRepository"> <batch:step id="step1"> <batch:tasklet> <batch:chunk reader="dataItemReader" processor="dataProcessor" writer="flatFileWriter" commit-interval="8" /> </batch:tasklet> </batch:step> </batch:job> <bean id="dataItemReader" class="org.springframework.batch.item.database.JdbcPagingItemReader"> <property name="dataSource" ref="dataSource"/> <property name="queryProvider"> <bean class="org.springframework.batch.item.database.support.SqlPagingQueryProviderFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="selectClause" value="select name,place,addr,phone"/> <property name="fromClause" value="from test"/> <!-- <property name="whereClause" value="where status=:status"/> --> <property name="sortKey" value="name"/> </bean> </property> <property name="pageSize" value="10"/> <property name="rowMapper" ref="rowMapper"/> </bean>
Thanks
Kannan


Reply With Quote
