【发布时间】:2011-05-31 05:41:59
【问题描述】:
编辑:用最新信息更新了这个问题...
我在运行依赖功能的背靠背“功能:卸载”命令时遇到问题。 OSGi 以“State change in progress...”作为响应,但是通过接受其他请求,我们遇到了问题。
奇怪的是,这会导致功能卸载成功,但捆绑包卸载不成功。我们通过尝试适当地订购卸载请求并在步骤之间添加延迟来解决此问题,但我希望有一个更强大的解决方案。
按照建议,我还尝试在步骤之间添加“osgi:refresh”...同样的行为。是否有另一种方法来检测“刷新包”仍在运行以延迟后续请求等?
这里是详细信息...
karaf@root> features:uninstall PolicyUtil
karaf@root> features:uninstall Policy1
karaf@root> features:uninstall Policy2
State change in progress for bundle "file:/policy2.jar" by thread "Refresh Packages".
karaf@root> features:uninstall Policy3
State change in progress for bundle "file:/policy3.jar" by thread "Refresh Packages".
karaf@root> features:uninstall Policy4
karaf@root> features:uninstall Enabler1
State change in progress for bundle "file:/enabler1.jar" by thread "Refresh Packages".
karaf@root> features:uninstall Enabler2
State change in progress for bundle "file:/enabler2.jar" by thread "Refresh Packages".
afterwards...we end up with features uninstalled (correct), but some bundles still installed (incorrect)
osgi:list
[ 277] [Installed ] [ ] [ ] [ 60] Policy2
[ 278] [Installed ] [ ] [ ] [ 60] Policy3
[ 280] [Installed ] [ ] [ ] [ 60] Enabler1
[ 281] [Installed ] [ ] [ ] [ 60] Enabler2
features:list
[uninstalled] [1.0 ] PolicyUtil repo-0
[uninstalled] [1.0 ] Policy1 repo-0
[uninstalled] [1.0 ] Policy2 repo-0
[uninstalled] [1.0 ] Policy3 repo-0
[uninstalled] [1.0 ] Enabler1 repo-0
[uninstalled] [1.0 ] Enabler2 repo-0
【问题讨论】:
标签: osgi apache-karaf apache-felix apache-servicemix fuseesb