Topic
7 replies Latest Post - ‏2012-11-15T14:51:37Z by SystemAdmin
SystemAdmin
SystemAdmin
590 Posts
ACCEPTED ANSWER

Pinned topic Controlling start order for OSGi bundles in Liberty

‏2012-10-21T00:09:57Z |
Hi,

Is there a way to control the start order of OSGi bundles deployed to Liberty?

Thanks,
Sumant
  • SystemAdmin
    SystemAdmin
    590 Posts
    ACCEPTED ANSWER

    Re: Controlling start order for OSGi bundles in Liberty

    ‏2012-10-22T15:52:52Z  in response to SystemAdmin
    Hi 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.

    http://wiki.osgi.org/wiki/Avoid_Start_Order_Dependencies
    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/topic/com.ibm.websphere.osgi.nd.multiplatform.doc/topics/ra_trouble.html#ra_trouble__tip07

    ________________________________________________
    "If you prefer to speak in Spanish, please contact me directly"
    • SystemAdmin
      SystemAdmin
      590 Posts
      ACCEPTED ANSWER

      Re: Controlling start order for OSGi bundles in Liberty

      ‏2012-10-22T21:10:31Z  in response to SystemAdmin
      Hi 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.

      Sumant
      • erin.schnabel
        erin.schnabel
        16 Posts
        ACCEPTED ANSWER

        Re: Controlling start order for OSGi bundles in Liberty

        ‏2012-10-22T21:34:44Z  in response to SystemAdmin
        You're asking about the start order of bundles deployed in an OSGi application? (verifying)
        • SystemAdmin
          SystemAdmin
          590 Posts
          ACCEPTED ANSWER

          Re: Controlling start order for OSGi bundles in Liberty

          ‏2012-10-22T21:38:53Z  in response to erin.schnabel
          Hi Erin, yes.
      • SystemAdmin
        SystemAdmin
        590 Posts
        ACCEPTED ANSWER

        Re: Controlling start order for OSGi bundles in Liberty

        ‏2012-10-23T01:07:32Z  in response to SystemAdmin
        Hi,

        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.

        Alasdair
        • SystemAdmin
          SystemAdmin
          590 Posts
          ACCEPTED ANSWER

          Re: Controlling start order for OSGi bundles in Liberty

          ‏2012-10-23T05:38:02Z  in response to SystemAdmin
          Thanks Alasdair.
        • SystemAdmin
          SystemAdmin
          590 Posts
          ACCEPTED ANSWER

          Re: Controlling start order for OSGi bundles in Liberty

          ‏2012-11-15T14:51:37Z  in response to SystemAdmin
          We'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.

          Regards
          Mark