Apr 26th, 2011, 06:50 AM
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...
Apr 28th, 2011, 08:17 AM
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.
May 12th, 2011, 01:09 AM
If the invoked stored procedure gives multiple resultsets, will StoredProcedureItemReader return items of the first resultset, or will it return nothing?