chickenlj commented on issue #9422:
URL: https://github.com/apache/dubbo/issues/9422#issuecomment-994558226
```java
public void preDestroy() {
if (!this.isStopping() && !this.isStopped()) {
this.onStopping();
this.unRegisterShutdownHook();
if (this.asyncMetadataFuture != null) {
this.asyncMetadataFuture.cancel(true);
}
this.unregisterServiceInstance();
this.unexportMetadataService();
}
}
```
ApplicationModel.java
```java
protected void onDestroy() {
if (this.deployer != null) {
this.deployer.preDestroy();
}
Iterator var1 = (new ArrayList(this.moduleModels)).iterator();
while(var1.hasNext()) {
ModuleModel moduleModel = (ModuleModel)var1.next();
if (moduleModel != this.internalModule) {
moduleModel.destroy();
}
}
this.internalModule.destroy();
if (defaultInstance == this) {
Class var5 = ApplicationModel.class;
synchronized(ApplicationModel.class) {
this.frameworkModel.removeApplication(this);
defaultInstance = null;
}
} else {
this.frameworkModel.removeApplication(this);
}
if (this.deployer != null) {
this.deployer.postDestroy();
}
this.notifyDestroy();
if (this.environment != null) {
this.environment.destroy();
this.environment = null;
}
if (this.configManager != null) {
this.configManager.destroy();
this.configManager = null;
}
if (this.serviceRepository != null) {
this.serviceRepository.destroy();
this.serviceRepository = null;
}
this.frameworkModel.tryDestroy();
}
```
--
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]