Change Bundle level in felix?

寵の児 提交于 2019-12-11 23:52:57

问题


I know how to set an initial bundle level, for just to be deployed bundle:

bundlelevel -i 5

But how do I change the level of an existing bundle? Help for bundlelevel says:

  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

I have no idea what "Bundle[]" argument is. I tried just bundle_id and [bundle_id], and even bundle name.

Let me show an example. Let's say I want to change bundle 5 (bookshelf api) level from 1 to 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)

I tried the following:

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.

Any help is appreciated.


回答1:


Made some experience in FUSE ESB but never used felix. Just downloaded felix 3.0.8 and tried:

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!

I tried hard to reproduce your problem but could not. It seams to work as specified. Did you tried it in a fresh installation or with a newer felix version (do not know what you are using)?




回答2:


Not the clearest of syntax messages I guess :) Bundle[] refers to bundle IDs. Do lb, get the ID for the bundle you want, then run

bundlelevel -s NEW_LEVEL BUNDLE_ID

e.g.: for level 4 and bundle 10, do

bundlelevel -s 4 10

Maybe you were getting complaints because you missed the -s?



来源:https://stackoverflow.com/questions/4822378/change-bundle-level-in-felix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!