I am trying to understand how to pass parameters to the job steps.
The reader of my batch is the spring batch HibernateCursorItemReader. But before the job is executed I want to read some parameters and pass them to the job. This should not be repeated by every iteration of the steps, but should be done only once.
How is this achived? Do I create a tasklet and let it do the job? How to I pass arguments from a tasklet to another?
Thank you for any help in this matter.
I was reading documentation and was blind to the spring framework.
I solved this problem by creating bean as a <tasklet> which reads the parameters from the database and is executed as step one of the batch job. I then use this bean as a property to the processor.
Does this solution solve my problem. Are there any reasons why I should not choose this approach?