Announcement Announcement Module
Collapse
No announcement yet.
Urgent Help needed - Composite writer with two diff databases Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Urgent Help needed - Composite writer with two diff databases

    We are doing a proof-of-concept for using Spring and Spring Batch in an existing application to cut costs.

    Without explaining the details of the project, at this point, our basic question is if it is possible to setup a composite writer that writes to separate databases, but maintains transactional semantics across all of the databases so that if one write fails, they all rollback? Out current test uses Oracle and Hsqldb, but the auto-commit has to be set true for saves to work, and rollbacks of course will not work with that setting. At least this has been our observation.

    If this is possible can you point us in the right direction for setup and configuration in Spring Batch?

    Thanks

  • #2
    Spring Batch is not magic, so it has to obey the laws of transactions. You can find some patterns here: http://www.javaworld.com/javaworld/j...nsactions.html. JTA would be an option, but if you were willing to tolerate the risk of partial commits, or you can deal with the result in your application, you could use a best efforts approach.

    Comment


    • #3
      Thanks for the reply Dave.

      Honestly was not trying to imply any magic, just that without knowing the tool well, you might have added that functionality somewhere although I had not seen it.

      At this time we did choose to deal with in the app as partial commits against a proof of concept is tolerable.

      Thanks again.

      Comment

      Working...
      X