I am using Spring batch solution for my project. I have a situation where I need to read ID's from a file and for those Ids I need to pull the data from the database, process it and then write it to an output file.
Currently I use a FlatFileItemReader to read the data from the file and then in the processor I collect them and for every thousand count (in clause has 1000 limitation) I hit the database to collect the data for those Ids and use a Writer to write the output.
But i somehow feel there should be a better way to do this. If I have access to the DB which I am hitting I could store these Ids in a temp table to join and get the output. But I cannot do that. Is there anyway to connect the readers.