[英]Set a bundle start level programatically on embedded Apache Felix 5
[英]Change Bundle level in felix?
我知道如何为要部署的捆绑包设置初始捆绑包级别:
bundlelevel -i 5
但是,如何更改现有捆绑包的级别? Bundlelevel的帮助说:
bundlelevel - set bundle start level or initial bundle start level
scope: felix
flags:
-i, --setinitial set the initial bundle start level
-s, --setlevel set the bundle's start level
parameters:
int target level
Bundle[] target identifiers
bundlelevel - query bundle start level
scope: felix
parameters:
Bundle bundle to query
我不知道“ Bundle []”参数是什么。 我只尝试了bundle_id和[bundle_id],甚至尝试了包名。
让我举一个例子。 假设我想将5包(书架API)级别从1更改为2。
g! lb
START LEVEL 5
ID|State |Level|Name
0|Active | 0|System Bundle (3.0.7)
1|Active | 1|Apache Felix Bundle Repository (1.6.2)
2|Active | 1|Apache Felix Gogo Command (0.6.1)
3|Active | 1|Apache Felix Gogo Runtime (0.6.1)
4|Active | 1|Apache Felix Gogo Shell (0.6.1)
5|Active | 1|Bookshelf Inventory API (1.5.0)
我尝试了以下方法:
g! bundlelevel -s 2 [5]
gogo: IllegalArgumentException: Cannot coerce
bundlelevel(String, String, ArrayList) to any of
[(boolean, boolean, int, Bundle[]), (Bundle)]
g! bundlelevel -s 2 5
Must specify target bundles.
任何帮助表示赞赏。
我猜不是最清晰的语法消息:) Bundle []指的是包ID。 lb,获取所需捆绑的ID,然后运行
bundlelevel -s NEW_LEVEL BUNDLE_ID
例如:对于第4级和捆绑包10,请执行
捆绑级别-s 4 10
也许是因为错过了-s而引起投诉?
在FUSE ESB上有一些经验,但从未使用过felix。 刚刚下载了felix 3.0.8并尝试:
g! lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (3.0.8)
1|Active | 1|Apache Felix Bundle Repository (1.6.2)
2|Active | 1|Apache Felix Gogo Command (0.8.0)
3|Active | 1|Apache Felix Gogo Runtime (0.8.0)
4|Active | 1|Apache Felix Gogo Shell (0.8.0)
g! bundlelevel -s 10 4
g! lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (3.0.8)
1|Active | 1|Apache Felix Bundle Repository (1.6.2)
2|Active | 1|Apache Felix Gogo Command (0.8.0)
3|Active | 1|Apache Felix Gogo Runtime (0.8.0)
4|Resolved | 10|Apache Felix Gogo Shell (0.8.0)
g!
我尽力重现您的问题,但没有。 它按照指定的方式工作。 您是在全新安装中还是在更新的felix版本中尝试过(不知道您在使用什么)?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.