Oct 5th, 2009, 10:18 AM
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 ?
Oct 5th, 2009, 05:25 PM
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