Announcement Announcement Module
Collapse
No announcement yet.
How to shared the same instane of one object with two steps diferents? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to shared the same instane of one object with two steps diferents?

    Friends.

    Now I have de below context.

    Processor in the STEP1 I create an object (PSURs) that the property has a list and add items to it.

    But now the processor in the STEP2 I need to add items to this list (PSURs) or make additions to existing items.

    To do this in my STEP2 I need to use the same instance of the object (PSURs) created in the processor STEP1.

    You know how I can share the same instance of an object between two different steps?

  • #2
    Well... it may not be the recommended way... but have you tried defining your object PSURs as a bean in your job.xml and tried injecting it into your reader/writer (of each step) whichever adds the items to it??

    Make sure to make your bean a singleton and spring should take care of it.

    Comment

    Working...
    X