Not exactly relevant here but FYI `AbstractManagementContext#terminate()` doesn't look thread-safe. The `running` flag should be changed to an `AtomicBoolean` with a CAS guard, I think.