Closed quhw closed 4 years ago
Hi @quhw, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.
java - Version
): - OS version (eg uname -a
): - Maven version: - IDE version:We should shutdown RuntimeShutdownAware first, then shutdown ComponentManager.
Describe the bug
背景:业务模块在主模块注册了业务路由信息,供主模块做业务路由选择。业务模块卸载时,需要通知主模块,主模块后续就不再路由到该业务模块。
问题:业务模块监听了SOFA的ApplicationShutdownCallback,在shutdown()回调中通过SOFA服务调用主模块的unregister()服务。但是看起来ARK的销毁顺序有问题,这个时候主模块的SofaReference已经被销毁了,导致无法unregister,主模块一直调用不存在的业务模块服务。
期望:shutdown()结束后再销毁reference,在sofa dynamic module中是正常的。
Expected behavior
Actual behavior
Steps to reproduce
Minimal yet complete reproducer code (or GitHub URL to code)
Environment
java -version
):uname -a
):