Chenjp commented on PR #14432:
URL: https://github.com/apache/dubbo/pull/14432#issuecomment-2232520573
> We should remove the shutdown hook when Dubbo Application has been
shutdowned by API.
@AlbumenJ I am confused by DubboShutdownHook. Each ApplicationModel has
related dubboShutdownHook. But following lines shows that its may impact other
application models of same fwk model.
```java
// send readonly for shutdown hook
List<GracefulShutdown> gracefulShutdowns =
GracefulShutdown.getGracefulShutdowns(applicationModel.getFrameworkModel());
for (GracefulShutdown gracefulShutdown : gracefulShutdowns) {
gracefulShutdown.readonly();
}
```
```java
// if all FrameworkModels are destroyed, clean global static resources,
shutdown dubbo completely
```
According the above comment, dubbo server supports more than one
FrameworkModel.
TODO:
1. move ApplicationModel (and sub-models) cleanup functions back to
ApplicationModel#onDestroy
2. Fwk model level cleanup - to FrameworkModel#onDestroy
3. Runtime hook on process exit, shutdown dubbo engine gracefully:
DubboShutdownHook supposed to do.
--
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]