Results 1 to 4 of 4

Thread: Transaction Rollback in Spring Batch

  1. #1

    Post Transaction Rollback in Spring Batch

    I have a Batch Program which read from different tables and Insert/update to 5 tables as per the business logic. I am using Spring JDBC for that. I want my whole trasaction should be rollback if some error happen in between but my batch program is not rolling back the previous transaction.

    Please help....

    Thanks

  2. #2
    Join Date
    Feb 2009
    Posts
    21

    Default

    Hi,

    I haved the same problem. i posted a similary question last week.

    Look the post below :
    HTML Code:
    http://forum.springframework.org/showthread.php?t=67736
    In fact, in the post Dave Syer say :
    Code:
    make sure you use the same DataSource in your ItemWriter as the JobRepository

  3. #3

    Default

    Thanks.
    I have used JobRepository as Mysql and my application is in DB2. is there any other way i can do that..

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

    Default

    Read this Javaworld article http://www.javaworld.com/javaworld/j...nsactions.html and see about the options there. In your case Spring Batch is the system of record, so to be be reliable, the business transactions either have to be idemptotent or you have to use JTA.

Posting Permissions

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