Skip to content

McNullty/spring-events-learning-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Events Learning Test

Notes

  1. Custom events are by default synchronous
  2. Number of threads is checked with jvisualvm
  3. If exception is raised and not handeled in event handler all handlers after that handler will not be executed.

Synchronous Event handling

This is default cinfiguration. If configuration is not changed Events will be handeled synchroniously.

This way no new Threads will be created.

Asynchronous Event handling

If this is configured new thread will be created for every class that implements interface ApplicationListener.

Notes about Spring implementation

Listener is invoked by SimpleApplicationEventMulticaster

List of listener is got by getApplicationListeners(ApplicationEvent, ResolvableType) in SimpleApplicationEventMulticaster

Listeners are added to list with AbstractApplicationEventMulticaster.addApplicationListenerBean(String)

Listeners are added by alphanumeric order by name.

Releases

No releases published

Packages

 
 
 

Languages