Announcement Announcement Module
Collapse
No announcement yet.
Passing extra parameters to reader, processor and writer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing extra parameters to reader, processor and writer

    I have a scenario where I need to pass multiple parameters to itemreader, item processor and itemwriter.

    There parameters are independent of input and ouput parameters

    For example these are like bean reference of logging service which logs all the errors (again this is not regular log4j) in data to a different file.

    Errors can happen in reader, writer or processor.Again these parameters can't be set as bean reference. I need to pass as parameter to different steps within a job

    Is there any way to make itemreader, processor, writer to take extra parameters?


    -Shirny

  • #2
    readers writers and processors are just regular spring beans so you can use the standard spring's dependency injection.

    If you want to pass Spring's specific parameters, you can use late binding as explained in the documentation
    http://static.springsource.org/sprin...l#late-binding

    Comment


    • #3
      But if I want to pass extra parameter to the processor
      As of now processor has input, output I want to pause another paramerter

      Comment


      • #4
        well, a processor is a spring bean. Inject whatever you need to using one of the standard Spring injection mechanisms

        Comment

        Working...
        X