felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre De Rop <pierre.de_...@alcatel-lucent.fr>
Subject question about the osgi presentation in osgi-berlin-20070321.pdf
Date Fri, 06 Mar 2009 08:40:26 GMT
Hello everyone;

I have read the Richard's osgi presentation from 
and there is something in the slide 36 ("OSGI R4 modularity details 4/7, 
sophisticated class space consistency model")
which I don't understand clearly.
This slide is about the "uses" clause. The whole point of the slide 36 
is to demonstrate that bundle* C* must not be wired to bundle *D*** 
(because of a potential linkage exception ...)
This is clear for me.

What is not clear is the following:
we see in the slide that:

    bundle A exports package "foo"
    bundle D exports package "foo"

so, in the osgi core specification, chapter 3.7, the following rules are 
applied, when the framework calculates bundle resolution for bundle C:

       1. A resolved exporter must be preferred over an unresolved exporter.
       2. An exporter with a higher version is preferred over an
          exporter with  lower version.
       3. An exporter with a lower bundle ID is preferred over a bundle
          with higher ID.


    * if A (or D) is not RESOLVED, then rules 1 applies and we are sure
      that both B/C will be wired to the same exporter for package foo
      (the RESOLVED exporter will win)
    * if A and D are both RESOLVED, then the rules 3 applies and we are
      also sure that both B/C will be wired to same exporter for package
      foo (with lower bundle ID)

So, regarding the two cases above: what is the benefit of using the 
"uses" clause ?
Could you please give me a use case which justify the usage of the 
"uses" clause ?

Many thanks;

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message