1

我有一些应用程序,使用了 Felix OSGi 框架。

更新后如何检查捆绑包?

即我有很多捆绑包并且所有捆绑包都已加载。我可以更新捆绑目录中的一些捆绑包。如何检查,哪些捆绑文件已更改以及哪些捆绑 - 未更改?

4

1 回答 1

2

You can register a BundleListener. It will be called whenever bundles change.

Normally this is not necessary though as there are other means to notify your other bundles of the changes. Typically you would offer a service in a bundle and use this service in another bundle. This other bundle can then use a ServiceTracker or a blueprint service reference and this way react on the service life-cycle.

于 2012-09-21T05:45:39.803 回答