generally speaking, if you have to do such action, it's not good ;)

Anyway, two things:

1. You can retrieve all bundles state using the bundleContext (so the framework) anytime 2. You can register a BundleListener (or FrameworkBundleListener) to be notify when a bundle state changes. If you want this listener started before your bundle, you can wrap it in a feature that is a prerequisite for other "user" space features.


On 13/03/2018 18:36, sathish_alwar wrote:

We  are using Karaf-4 and we have several bundles (say 100) getting started
as part of our feature. We are using Bundle and Blueprint listener to
monitor the status of each and every bundle. Since all bundles are started
simultaneously we guess the bundle in which we have registered listeners is
sometimes started little late and we loose some bundles states. Please let
us know how to get events for all the bundles without missing any event.

Also please let us know if it is possible to poll all bundles state.
Basically we need to get Bundle object by providing bundle symbolic name and
query for its current state.

Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply via email to