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
Angelo van der
Sijpt
<angelo.vandersij To
[EMAIL PROTECTED]> OSGi Developer Mail List
Sent by: <[email protected]>
osgi-dev-bounces@ cc
www2.osgi.org
Subject
Re: [osgi-dev] Uses-constraint
09/21/2007 02:30 targeting a package that is not
AM imported
Please respond to
OSGi Developer
Mail List
<[EMAIL PROTECTED]
gi.org>
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<<inline: graycol.gif>>
<<inline: pic02936.gif>>
<<inline: ecblank.gif>>
_______________________________________________ OSGi Developer Mail List [email protected] http://www2.osgi.org/mailman/listinfo/osgi-dev
