Nov 15th, 2011, 02:44 AM
Implemeting a CustomItemReader / help
i have this particular usecase that i need to implement using spring batch.
I Have to export a set of data to a file.
THe data that i need to export will come from a database, but need to be retrieved using a custom java bean. IN addition, the data retrieval process is not straightforward.
Here is how it goes:
1 - extract columnX and columnY from MyTable (this can return n rows)
2 - for each of the column extracted at 1), call MyService.query(x, y) to retrieve the data that will be exported
I am guessing that operation 1 and 2 will be done in two separate steps, but how can i pass the data between step 1 and step 2?
operation in step2 looks like a custom ItemReader (or ItemProcessor)....which needs to be invoked for every item retrieved at 1.
could anyone guide me on how to implement my batch correctly?
Nov 15th, 2011, 06:29 AM
ok i thought about it, and i believe with a jdbcItemREader (which select data from db), an ItemProcessor (which queries my service) and an ItemWriter should do it
sorry for bothering