Reputation: 121
how does the karaf client's bundle:list command determine the bundles' states? When a bundle show "Failure" in bundle:list, programmatically running this bundle's getState() (to display on a gui) shows Active. Is there another api i can use to determine if the bundle is in Failure state? Karaf version is 4.1.5 although it shows on earlier versions too. Thanks.
Upvotes: 0
Views: 273
Reputation: 11
I've had a similar situation. If you look at the Karaf sources for the bundle:list, you'll notice that they use org.apache.karaf.bundle.core.BundleInfo to get the state via org.apache.karaf.bundle.core.BundleService =>
org.apache.karaf.bundle.core.BundleInfo info = bundleService.getInfo(bundle.get());
info.getState();
Upvotes: 1