REQUIRES_NEW

Always run in a transaction of its own, on a session of its own.

The surrounding transaction is suspended for the duration and neither can roll the other back. This is what an audit record wants: it has to survive the failure of the work that produced it.

Note that the two transactions are then holding two connections at once, and the inner one cannot see the outer one's uncommitted rows.

Properties

Link copied to clipboard
Link copied to clipboard