Announcement Announcement Module
Collapse
No announcement yet.
How can I stop a table from being rolled back Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment

    Working...
    X