Created recently

Save notifications discarded if object saved during commit

Description

If an IArchetypeServiceListener.saved() is invoked at the commit of a transaction, and it goes on to save or remove an object, an subsequent changes do not trigger notifications. This is because TransactionSynchronizationManager clears the synchronisations when the saved() method completes.

To avoid this, the Notifier.notifyCommit() and Notifier.notifyRollback() needs to establish a new transaction, which forces synchronisations to be retained.

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Priority

Minor