Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Doc: Lifecycle beans aren't stopped before destruction in some scenarios such as context refresh [SPR-11671] #16294
It may be regarded as a sort of resource leak. When the application context is refreshed, old bean instances that implement Lifecycle are not automatically stopped. The leakage may occur silently if the application developer is not aware that some beans implement Lifecycle, and simply calls refresh.
If refresh is deliberately not integrated with Lifecycle, then consider it an error condition to call refresh on a context before stopping it.
At minimum, please improve the documentation around behavior of Lifecycle beans and context refresh.
No further details from SPR-11671
Juergen Hoeller commented