Files
spring-boot/spring-boot-project
Brian Clozel e2bd95596d Shut down Reactor Schedulers for WAR deployments
Prior to this commit, Spring applications and libraries would call
`Schedulers.boundedElastic()` or similar static methods at runtime. This
would ininitialize and cache reactive schedulers for the Reactor core
library. Those instances are cached for the lifetime of the JVM and are
shared static instances.

In a  WAR deployment case, those schedulers would be initialized and
tied to the web application servlet context class loader. When
undeploying the web applications, schedulers would not be automatically
shut down and this would keep the now useless application classloader,
leaking resources.

This commit ensures that Spring Boot shuts down shared schedulers if
they were loaded and initiazed by the web application classloader, once
the the Spring application context is closed.

Closes gh-41548
2024-07-25 16:06:59 +02:00
..
2024-07-22 19:59:27 +01:00
2024-07-22 18:41:53 +01:00
2024-07-24 19:23:04 +01:00