Currently I need to implement the following steps with Spring batch:
- Read table data from data source A;
- Read table data from data source B based on the column values I get from data source A at step 1 as search criteria;
- Write what I get at step 2 to some other place
Technically I have no problem dealing with step 1 and step 3, but anyone could advise how to tackle step 2? I understand that after step 1 I can get a rowMapper class that maps each row of data to my domain object, in this case how to pass the column values (domain object attributes) as the parameters to step 2?

ItemProcessorwhich looks up what you need from the database based on the input.ItemProcessorsimply use aJdbcTemplateto execute a query to get what you want from the database and pass it on to theItemWriter. This is pretty much as clear as I can get, without implementing it for you.ItemReaderis automatically passed to theItemProcessorand that result is passed to theItemWriterin a chunk oriented step. What you have is basically a single step in your sequence 1. is theItemReader, 2. is theItemProcessorand 3. is theItemWriter.