Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveBeansView#unregister should not rely on ApplicationContext#getApplicationName [SPR-14848] #19414

spring-projects-issues opened this issue Oct 26, 2016 · 0 comments


Copy link

@spring-projects-issues spring-projects-issues commented Oct 26, 2016

Stéphane Nicoll opened SPR-14848 and commented

LiveBeansView assume that the order in which contexts are started will be reversed on shutdown. That way, it registers an MBean for the first context (usually the parent) and unregisters it on shutdown.

If the shutdown sequence changes for whatever reason (more precisely if the parent isn't shutdown last), then an attempt to shutdown an unknown MBean is made. Restarting the same context will lead to another error since we're trying again to register the MBean that wasn't removed.

Rather than relying on the order there, we should store the name of the MBean that was registered to effectively do it when all the contexts have been shutdown.

See also #7179 in the Spring Boot tracker

Affects: 4.3.3

Referenced from: commits 1f3b8ff, 1a1d17e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants