Hi all
I see a strange behavior about bundles life cycle management i Karaf.
I have a bundle "Sample Dependent" that depends from a bundles "Sample
Dependency". I install both bundle in karaf and they go in Started state.
Suppose that "Sample Dependency" has id 87 and "Sample Dependent" has id 88.
If I digit

uninstall 87

I would expect that bundle 88 will go in Installed (not resolved) state.
Instead the bundle "Sample Dependent" remains in Started.
Also if I do refresh or update, the bundle remain in Started.
If I restart karaf I see that the bundle "Sample Dependent" is not resolved.

In the file system folder /data/cache I see that bundle 87 relative folder
is not deleted until karaf is running. This explain the behavior.

My question is: is this the desired behavior? Or the desired behavior is
what I expected?


N.B. if I use the deploy folder, after removing the bundle "Sample
Dependency" the bundle "Sample Dependent" goes in Installed state.


Regards
Giuseppe
karaf@root> list
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Level  Name
[  87] [Active     ] [            ] [   80] Sample Dependency Bundle 
(1.0.0.SNAPSHOT)
[  88] [Active     ] [            ] [   80] Sample Dependent Bundle 
(1.0.0.SNAPSHOT)

karaf@root> packages:imports 88
Sample Dependency Bundle (87): com.example.dependency; version=1.0.0.SNAPSHOT

karaf@root> uninstall 87

karaf@root> list
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Level  Name
[  88] [Active     ] [            ] [   80] Sample Dependent Bundle 
(1.0.0.SNAPSHOT)

karaf@root> packages:imports 88
Sample Dependency Bundle (87): com.example.dependency; version=1.0.0.SNAPSHOT

karaf@root> refresh 88

karaf@root> list
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Level  Name
[  88] [Active     ] [            ] [   80] Sample Dependent Bundle 
(1.0.0.SNAPSHOT)

karaf@root> packages:imports 88
Sample Dependency Bundle (87): com.example.dependency; version=1.0.0.SNAPSHOT

karaf@root> install mvn:com.example/sample-dependency/1.0.0-SNAPSHOT
Bundle ID: 89

karaf@root> list
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Level  Name
[  88] [Active     ] [            ] [   80] Sample Dependent Bundle 
(1.0.0.SNAPSHOT)
[  89] [Installed  ] [            ] [   80] Sample Dependency Bundle 
(1.0.0.SNAPSHOT)

karaf@root> packages:imports 88
Sample Dependency Bundle (87): com.example.dependency; version=1.0.0.SNAPSHOT

karaf@root> start 89

karaf@root> packages:imports 88
Sample Dependency Bundle (87): com.example.dependency; version=1.0.0.SNAPSHOT

karaf@root> stop 88

karaf@root> packages:imports 88
Sample Dependency Bundle (87): com.example.dependency; version=1.0.0.SNAPSHOT

karaf@root> refresh 88

karaf@root> packages:imports 88
Sample Dependent Bundle (88): No active imported packages. This command only 
works on started bundles, use osgi:headers instead

karaf@root> resolve 88

karaf@root> packages:imports 88
Sample Dependency Bundle (87): com.example.dependency; version=1.0.0.SNAPSHOT


Reply via email to