You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
Dubbo version: 2.7.0
Operating System version: mac
Java version: 1.8
org.apache.dubbo.config.AbstractConfig:
static {
// this is only for compatibility
Runtime.getRuntime().addShutdownHook(DubboShutdownHook.getDubboShutdownHook());
}
The jvm hook is registered by default. When the user uses spring, the default hook is not removed. It was the earliest cause of this shutdown graceful, mainly due to this reason. Please note:
Spring does not register hooks by default, but users may register themselves, spring-boot will also register hooks by default.
private static class ShutdownHookListener implements ApplicationListener {
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (event instanceof ContextClosedEvent) {
// we call it anyway since dubbo shutdown hook make sure its destroyAll() is re-entrant.
// pls. note we should not remove dubbo shutdown hook when spring framework is present, this is because
// its shutdown hook may not be installed.
DubboShutdownHook shutdownHook = DubboShutdownHook.getDubboShutdownHook();
shutdownHook.destroyAll();
}
}
}
The text was updated successfully, but these errors were encountered:
Environment
org.apache.dubbo.config.AbstractConfig
:The jvm hook is registered by default. When the user uses spring, the default hook is not removed. It was the earliest cause of this shutdown graceful, mainly due to this reason. Please note:
Spring does not register hooks by default, but users may register themselves, spring-boot will also register hooks by default.
org.apache.dubbo.config.spring.extension.SpringExtensionFactory.ShutdownHookListener
:The text was updated successfully, but these errors were encountered: