Remove spring.event.invoke-listener startup event

Prior to this commit, the `SimpleApplicationEventMulticaster` would be
instrumented with the `ApplicationStartup` and start/stop events for
invoking event listeners (`spring.event.invoke-listener`).

This feature was already limited to single-threaded event publishers,
but is still flawed since several types of events can happen
concurrently. Due to the single-threaded nature of the startup sequence,
our implementation should not produce startup events concurrently.

This can cause issues like gh-26057, where concurrent events lead to
inconcistencies when tracking parent/child relationships.

This commit removes the `spring.event.invoke-listener` startup event as
a result.

Fixes gh-26057
This commit is contained in:
Brian Clozel
2020-12-03 14:41:23 +01:00
parent 8f0ad73bfd
commit 4337d8465c
3 changed files with 1 additions and 38 deletions

View File

@@ -1669,8 +1669,4 @@ its behavior changes.
| `spring.context.refresh`
| Application context refresh phase.
|
| `spring.event.invoke-listener`
| Invocation of event listeners, if done in the main thread.
| `event` the current application event, `eventType` its type and `listener` the listener processing this event.
|===