I am working in a project where we are using Spring batch framework. I am novice to it.
I have a task which is like reading a fixed length flat file length and then process it and populate some bean and after that using some value from the request I have to fetch data from Database using Oracle and then generate some response as a fixed length flat file.
I have pasted below the little code snippet from configuration file.
<bean name="tickerReader"
class="org.springframework.batch.item.file.FlatFileItemReader">
<property name="resource" ref="fileSystemResource" />
<property name="lineMapper" ref="tickerLineMapper" />
<bean>
..............................
..............................
<batch:job id="TickerPriceConversion">
<batch:step id="convertPrice">
<batch:tasklet transaction-manager="transactionManager">
<batch:chunk reader="tickerReader" processor="tickerPriceProcessor"
writer="simbeqResponseFlatFileWriter" commit-interval="10" >
</batch:chunk>
</batch:tasklet>
</batch:step>
</batch:job>
I have done the reading part i.e. reading the request file and populated the corresponding bean. Now I need to fetch data from Oracle using hibernate corresponding to the data from the request. I am not sure how to do it? How should i go about it means configuring session factory and using it to fetch data.
Can someone please guide me?