I have a scenario that I've come across a few time. I'm using a jdbc:inbound-channel-adapter to retrieve say 100 rows from a table. I need to process each row with its own transaction. To accomplish this I have the follow setup:
jdbc:inbound-channel-adapter
|
|
V
splitter (output channel is a queue channel)
|
|
V
service-activator (configured with a poller to begin the transaction boundary)
|
|
V
null-channel (commits the transaction)
Is this the correct approach? Is the QueueChannel the best choice for the Pollable Channel? Is there a way to configure the JDBC Inbound Adapter to have a message per row on a select that returns more than one row (in the past I've restricted the select to only return one row, but these were for low volume processes). What should I consider regarding the timing of the two pollers (jdbc inbound adapters, and service-activator)? The approach above seems to working, but is it the best approach?


Reply With Quote