Results 1 to 2 of 2

Thread: automatic activation of dependencies

  1. #1
    Join Date
    Nov 2007
    Location
    Netherlands
    Posts
    36

    Default automatic activation of dependencies

    I'm relatively new to OSGi and Spring-DM, so I'm not sure if my question is specific to Spring-DM or to OSGi in general.

    Anyway, I have a Spring-DM bundle "A" (Eclipse plugin) which needs a mandatory service from another Spring-DM bundle "B".

    A declares B as "Require-Bundle" in its manifest. After A is activated, it's Spring context gets loaded. But it seems that B is not automatically activated, so A keeps waiting forever for the service that is declared in the Spring context of B which isn't loaded because B doesn't get activated.

    Doesn't OSGi automatically activate required bundles?

    I can easily solve this by setting B to auto-start. But isn't this an ugly hack?

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Spring DM is a passive component in that it does not activate bundles. Only after a bundle is started, Spring DM kicks in.
    To start bundles you can use either auto-start (in Equinox) or start levels for a more portable approach.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •