yuxiao97 opened a new issue #8892: URL: https://github.com/apache/dubbo/issues/8892
- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. - [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate. ### Environment * Dubbo version: 2.7.7 * SpringBoot version: 2.1.1.RELEASE * Operating System version: Linux * Java version: 1.8 ### Steps to reproduce this issue 发现Dubbo的优雅停机和Spring的优雅停机并没有先后顺序,都是注册到Runtime的shutdownHook中的,这样Dubbo还能真正的优雅停机嘛?如何做到真正的优雅停机? Dubbo注册关闭勾子的源码如下,位于DubboBootstrap中 ``` private DubboBootstrap() { configManager = ApplicationModel.getConfigManager(); environment = ApplicationModel.getEnvironment(); DubboShutdownHook.getDubboShutdownHook().register(); ShutdownHookCallbacks.INSTANCE.addCallback(new ShutdownHookCallback() { @Override public void callback() throws Throwable { DubboBootstrap.this.destroy(); } }); } ``` 此处并没有和Spring的ApplicationContextEvent事件关联,所以Dubbo配合Spring时还不是真正的优雅停机。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
