Keep in mind that just because all bundles are in some desired state (e.g. ACTIVE) does not mean anything to the health or readiness of the "application". You only know best where the current system is in the boot process.
For Karaf specific implementation i could think of a bundle starting with a low startLevel (early in the process) and filtering events coming in. (supplemented by karaf that could fire those events when certain things are "done" (lets say startup features are loaded, e.g.). But in the end its up to you providing a key services that - when available - signals the readiness of your "application". Its all about what you are building on top of Karaf (or any vanilla OSGi runtime). Is it a cohesive app or a "platform" of some kind. What you could also do is using the StartLevelService as a (poor man's) progress indicator. But still, this does not honor the service layer at all. Toni On Mon, Jun 20, 2011 at 1:25 PM, Andreas Pieber <[email protected]> wrote: > I'm a little bit sceptical about this, because also the splash-bundle > would start quite late in the process; nevertheless, I think the > easiest solution is to retrieve all bundles. First thing karaf is > doing is to resolve all bundles from all features and then starting > them. Which means you can easily provide a bar with > > 0---(allBundles-notStartedBundlesByNow)-------allBundles > > Kind regards, > Andreas > > On Mon, Jun 20, 2011 at 1:02 PM, [email protected] <[email protected]> > wrote: > > Hi! > > > > I'm using karaf and I have the module, which shows splash screen during > > application startup. But I can't display progress bar correctly, because > I > > don't know at runtime, how many bundles would start. > > > > One of decisions is to use infinite progress bar during startup. Is there > > any way to realize, that deployment cycle is finished? > > Second, is to use finite progress bar, but I need to get some kind of > build > > plan to determine, how many bundles would be deployed. > > > > Does Karaf has such features? > > > > Thanks. > > > > > -- Toni Menzel Source <http://tonimenzel.com>
