Search code examples
javaosgiequinox

What is the difference between osgi.startLevel and osgi.bundles.defaultStartLevel


What is the difference between osgi.startLevel and osgi.bundles.defaultStartLevel present in config.ini of equinox OSGI implementation. I Also want to know how these configuration items are related to number of bundles to be deployed?


Solution

  • There are two things going on: the current start-level of the OSGi Framework, and the required start-level of each bundle.

    When the framework reaches a particular start-level, all of the bundles at that start-level get started. So when the framework enters level 6, all of the bundles that are at level 6 are started (but the bundles at level 7 are not yet started).

    osgi.startLevel is simply the start level that the OSGi Framework will try to reach after you boot it up.

    osgi.bundles.defaultStartLevel is the start level that any bundle has by default if you don't set it to something else.

    So for example if you set osgi.startLevel to 3 and osgi.bundles.defaultStartLevel to 4, then basically no bundles will be started!