Is there a way to control the start order of OSGi bundles deployed to Liberty?
This topic has been locked.
7 replies Latest Post - 2012-11-15T14:51:37Z by SystemAdmin
Pinned topic Controlling start order for OSGi bundles in Liberty
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Re: Controlling start order for OSGi bundles in Liberty2012-10-22T15:52:52Z in response to SystemAdminHi Sumant.
Sorry but I don't have the answer for this, but I have a hint though. According to OSGi best practices, you should not rely on the start orderof your bundles. Here two links that might find useful.
"If you prefer to speak in Spanish, please contact me directly"
Re: Controlling start order for OSGi bundles in Liberty2012-10-22T21:10:31Z in response to SystemAdminHi Victor,
Thanks for your response. I understand the general guideline but sometimes, as mentioned in the document you provided a link for, dependencies are unavoidable. Which is why OSGi defines the concept of start levels - http://www.osgi.org/javadoc/r4v43/core/org/osgi/service/startlevel/StartLevel.html. If Liberty does not expose control over bundle start levels, I may need to find alternate ways to enforce dependencies.
erin.schnabel 0600002N0N16 PostsACCEPTED ANSWER
Re: Controlling start order for OSGi bundles in Liberty2012-10-22T21:34:44Z in response to SystemAdminYou're asking about the start order of bundles deployed in an OSGi application? (verifying)
Re: Controlling start order for OSGi bundles in Liberty2012-10-23T01:07:32Z in response to SystemAdminHi,
The OSGi applications support in WebSphere Application Server does not provide a mechanism to specify the start level for an OSGi bundle, or to order the activation of bundles within the application.
Re: Controlling start order for OSGi bundles in Liberty2012-11-15T14:51:37Z in response to SystemAdminWe've found that although the start order cannot be explicitly set, the actual bundle starting sequence is based on the order of references to the bundles in the APPLICATION.MF file. So we've been able to specify a preferred order in this way.
This is clearly no guarantee of future support, but has helped us out in our application that has over 350 bundles and well over 800 services.