Results 1 to 3 of 3

Thread: What If StoredProcedureItemReader Retrieves Multiple Result Sets?

  1. #1
    Join Date
    Dec 2010
    Posts
    27

    Default What If StoredProcedureItemReader Retrieves Multiple Result Sets?

    If StoredProcedureItemReader invokes a stored procedure which returns multiple result sets, will all items in all these result sets be passed through the same processor and the same writer of the chunk-oriented step?

    It would be great, if I can write items from different result sets into different database tables...

  2. #2
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    StoredProcedureItemReader doesn't know what to do with multiple result sets. You would have to write your own reader and unpack the items with a wrapper to tell the downstream components (processor, writer) how to deal with them. If they were simply Objects of a different type, your Writer could send them to a DAO that knows how to dispatch to different tables based on type. There's nothing magical there.

  3. #3
    Join Date
    Dec 2010
    Posts
    27

    Default

    If the invoked stored procedure gives multiple resultsets, will StoredProcedureItemReader return items of the first resultset, or will it return nothing?

Posting Permissions

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