Note that there are some explanatory texts on larger screens.

plurals
  1. POIs it reasonable to use different Start Levels to manage the dependencies between OSGi bundles?
    text
    copied!<p>My team are trying to develop a new system based on OSGi, and now we have more than 50 bundles and counting. The problem is, there is dependency between bundles. For example, when bundle A startup, it will register a service to OSGi, and when bundle B startup, it will use that service. Therefore I need bundle A startup earlier than bundle B. To make this happen, I set the start level of bundle A less than bundle B.</p> <p>We tried to use ServiceTracker to avoid setting start levels, but when the services count growing up, it become difficult to manage and to understand the whole system.</p> <p>However, I found this article on the internet: <a href="http://eclipsesource.com/blogs/2009/06/10/osgi-and-start-levels/" rel="noreferrer">OSGi and Start Levels</a>. I'm not sure with two sentences in it:</p> <blockquote> <ul> <li>Start order within the start level is indeterminate!</li> <li>On the whole, when working with start levels, never depend on start order. Think about start levels as a management issue, not a development time issue.</li> </ul> </blockquote> <p>Does it mean that start level will not decide the start order? Then when should I use it?</p> <p>Is it reasonable to use different Start Levels to manage the dependencies between OSGi bundles?</p> <p>It is possible to make all the bundles being a dynamic module(use ServiceTracker to track all the services it use), but it takes more time and demand senior developers, and the system become difficult to debug.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload