Results 1 to 3 of 3

Thread: Passing parameters

Hybrid View

  1. #1

    Default Passing parameters

    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.

  2. #2

    Default Solved?

    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?


  3. #3
    Join Date
    Nov 2007
    Location
    Sun Prairie, WI
    Posts
    50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •