Results 1 to 2 of 2

Thread: How can I stop a table from being rolled back

  1. #1
    Join Date
    Mar 2008
    Posts
    5

    Default How can I stop a table from being rolled back

    In my Spring Batch job i update a status table before the job exits. The problem I have is, if an exception is caught I update the status and then throw the JobInterruptedException. This make the Job stop and exit, but it also rolls back the tables, including my status table. I don't want my status table to be rolled back. Is there any way to keep the status table from being rolled back ?

    Thanks

  2. #2
    Join Date
    Feb 2008
    Posts
    488

    Default

    Perform the status update in a method that has REQUIRES_NEW transaction propagation.

    See the Spring transaction documenation: http://static.springsource.org/sprin...ansaction.html

Posting Permissions

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