Announcement Announcement Module
No announcement yet.
JDBC Inbound channel adapter synchronization worry Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JDBC Inbound channel adapter synchronization worry


    I have an application running in a clustered environment using a JDBC inbound adapter channel configured to select "new" rows for processing, and update those rows to "processing" once selected. Since the application is running on different servers simultaneously, I'm concerned that between the select and update, another instance of the application will select the same rows. Behind the scenes, are these statements issued at the same time, or is there a chance that immediately after one instance of the application selects rows for update, another instance will select those same rows?

    Please advise.


  • #2
    Separate statements are executed.

    As long as your poller is transactional, the query and update will be done in the same transaction; as long as you do SELECT ... FOR UPDATE in the query, the selected rows should be locked and not picked up by other instances.

    You may need to use SERIALIZABLE isolation, depending on what else you are doing in the same transaction.


    • #3
      Hi Gary, Thanks for the reply.

      We will run a few tests using this assumption (that selected rows will be locked).