We're updating the issue view to help you get more done. 

Register for additional committing events

Description

Add an ICommittingEventRegistrar.RegisterForAdditionalCommittingEvents API available to handlers of IClientTransactionExtension.Committing, ClientTransaction.Committing, and DomainObject.Committing that causes the whole committing event chain to be executed one additional time for the given DomainObjects.

The committing event chain consists of IClientTransactionListener.TransactionCommitting, IClientTransactionExtension.Committing, ClientTransaction.Committing, and DomainObject.Committing. Usually, every event handler in the committing event chain receives each object in the commit set exactly once (with the order in which the DomainObject.Committing event is raised being undefined). For example, when a set of objects (a, b) is in the commit set, the events are raised as follows:

  1. IClientTransactionListener.TransactionCommitting and IClientTransactionExtension.Committing for (a, b)

  2. ClientTransaction.Committing for (a, b)

  3. a.Committing, b.Committing (order undefined)

If any event handler adds an object c to the commit set (e.g., by changing or creating it), the whole chain starts again, but only for c.

If a handler changes one of the objects already in the commit set (i.e., a or b), the chain just proceeds and is not reexecuted. This means that it is possible that the state of an object changes after the committing event handlers for it have executed. The purpose of the RegisterForAdditionalCommittingEvents API is to force the chain to run again for a given set of objects, allowing the handlers to operate on a more recent state than before:

  1. IClientTransactionListener.TransactionCommitting and IClientTransactionExtension.Committing for registered/additional objects from last run

  2. ClientTransaction.Committing for registered/additional objects from last run

  3. DomainObject.Committing for registered/additional objects from last run (order undefined)

If during that additional run objects are rescheduled or added, another run will be performed, etc.

Assignee

Fabian Schmied

Reporter

User known

Labels

Time tracking

8h

Components

Fix versions

Affects versions

Priority

Normal
Configure