Used to annotate events which need to be aware of the surrounding transaction, if any.
The primary use case for this annotation is events which are raised when a persistent entity is updated in some way. Such events may be raised while the transaction to update the entity is still in progress, but should only be published when the transaction is committed.
TransactionAware event is raised while no transaction is in progress, it is always published immediately
regardless of the configuration applied by this annotation.
This setting is inherited. If a derived event does not need to be transaction aware, it may be annotated with:
Such configuration indicates the event should be published immediately when it is raised, which is the same behaviour
that is applied if this annotation is not present on the event's class.
|TransactionAware.When||Defines the different points, relative to a transaction's lifecycle, at which an event can be published.|