开发者

Is there anyway to limit bundle version while updating?

开发者 https://www.devze.com 2023-04-09 16:50 出处:网络
When I use update command in OSGi, the framework (Equinox) uses the file in update location in order to update the bundle. No matter if the bundle in the location has a highe开发者_如何学JAVAr version

When I use update command in OSGi, the framework (Equinox) uses the file in update location in order to update the bundle. No matter if the bundle in the location has a highe开发者_如何学JAVAr version or not. for example the framework updated version 1.2.0 with 1.0.0.

is there anyway to limit the version of the file that is going to be used as the updated file? I mean something like what we can do in import bundles.


No, the framework won't do this kind of checking for you. If you don't want to update the bundle from that location, just don't call update.

Note that it is possible to update a bundle from a different location than it was originally installed from, using the version of the update method that takes an InputStream, e.g.:

File newLocation = new File("...");
bundle.update(new FileInputStream(newLocation));
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号