Announcement Announcement Module
Collapse
No announcement yet.
Passing parameters Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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?

    Comment


    • #3
      Check this out!! http://forum.springsource.org/showthread.php?t=85093

      Comment

      Working...
      X