Announcement Announcement Module
Collapse
No announcement yet.
Should not rollback the transaction for inserting a record in ItemWriteListener Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Should not rollback the transaction for inserting a record in ItemWriteListener

    Hi,
    For Every Exception that happens during the write() process i have written a listener that implements ItemWriteListener. In the onWriteError() i capture the record information with other details and insert in my own custom table. However what i see is although the method executed fine i cannot see the record in the table. Is it because the transaction gets rolled back. If yes what is the soln?

    Thanks in advance.

  • #2
    See here for a common solution: http://static.springsource.org/sprin...ingAndFailures. It says

    ...consider adding a declarative transaction to that method (see Spring Core Reference Guide for details), and giving its propagation attribute the value REQUIRES_NEW

    Comment

    Working...
    X