0

Is it possible to control the start level of bundles dropped in the pickup folder? Is there a way for a bundle to ask that it not be activated until a certain other service becomes available?

We have many bundles with interdependencies managed entirely by start levels; i.e. if Bundle Y needs Bundle X at its start-up then Y has a higher start-level.

This does not work well if a bundle is dropped in the pickup directory. It seems these bundles start before any other and in arbitrary order among themselves, perhaps concurrently.

Is there a way to control the start-level of bundles in pickup folder?

Even better, is there a way for a bundle to declare its dependencies on other services? In that case I can even use that with multiple bundles in pickup with one dependent on another.

Miserable Variable
  • 28,432
  • 15
  • 72
  • 133

1 Answers1

0

You can only restrict the resolution of bundles to the availability of capabilities, but not the activation. Activation certainly happens after resolution, but resolved bundles may be activated in any order. So bundle-level activation dependencies don't work well.

Instead, you should use "components" (i.e. declarative services) which have the option to bind their lifecycle to the availability of other components. With this option, the bundles may start in an arbitrary order, but services are still only activated/exposed once all its service dependencies are activated.

oberlies
  • 11,503
  • 4
  • 63
  • 110