LiveBeansView#unregister should not rely on ApplicationContext#getApplicationName [SPR-14848] #19414
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
The text was updated successfully, but these errors were encountered: