OK, that makes perfect sense. Shouldn't the spec include some note on this? I checked the part on Require-Bundle, but it is not mentioned explicitly there either. It does mention, however, that all the Require-Bundle's exported packages get implicitly imported at resolve time.

Angelo

On Sep 21, 2007, at 15:36 , Thomas Watson wrote:

The uses constraint can refer to a package which you get through Require-Bundle as well. At bundle install time the framework cannot infer all the packages which a bundle may get through Require- Bundle. This can only be done at resolve time. This makes it impossible to disallow with an install error when a uses constraint refers to a package which is not accessible by the bundle through one of its required constraints (i.e Import-package or Require- Bundle). A framework must simply ignore uses constraints for packages which the exporting bundle cannot access.

Tom



<graycol.gif>Angelo van der Sijpt ---09/21/2007 03:10:19 AM---OK, thanks.

Angelo van der Sijpt <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
09/21/2007 02:30 AM
Please respond to
OSGi Developer Mail List <[email protected]>

<ecblank.gif>
To
<ecblank.gif>
OSGi Developer Mail List <[email protected]>
<ecblank.gif>
cc
<ecblank.gif>
<ecblank.gif>
Subject
<ecblank.gif>
Re: [osgi-dev] Uses-constraint targeting a package that is not imported
<ecblank.gif>     <ecblank.gif>

OK, thanks.
What does this imply for the behavior of a framework, when it encounters a uses constraint targeting a package that is neither imported or exported? Should it be disallowed, or simply (silently) ignored?

Angelo


On Sep 20, 2007, at 23:54 , Richard S. Hall wrote:

The "uses" constraint has to refer to a package that is either imported or exported.

I think the text doesn't necessarily reflect the diagrams. I think the bundle is comprised of rectangles, where the black rectangles represent exported packages and the white rectangles represent imported packages.

So, the textual description should also be updated to include the exported r package.

-> richard


Angelo van der Sijpt wrote:
Hello,

Going through section 3.6.4 of the OSGi specification (R4.1), about package constraints, I noticed something in the example depicted in Figure 3.17. According to the description before that (p. 44), bundle A imports a package q, and exports a package p which uses packages q and r. Package r is not exported or imported, but it is drawn as an exported package in Figure 3.17. This could mean several things, which are not clear from the surrounding text. 1. Including r in both the text and figure is a mistake, and should have been left out altogether. 2. r is really an exported package (although it is not used in the example), but has been left out in the textual representation. 3. r is actually a private package, which is used by q. This would imply that no bundle can be wired to p when it imports (or embeds) r.

In short, I believe that either information is missing that states what should be done with uses-constraints targeting packages which are not imported or exported, or the example contains an error. In either case, it would be useful to state either that uses- constraints can only target imported or exported packages, or what a uses-constraint targeting a non-imported or -exported package means.

Thanks in advance,

Angelo van der Sijpt
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev




_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev
<graycol.gif><pic02936.gif><ecblank.gif>
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

-----------------------------
Angelo van der Sijpt
Software Engineer iQ Products
-----------------------------
[EMAIL PROTECTED]
+31-6-23648357
www.luminis.nl
www.luminiq.nl
-----------------------------



_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to