Burkhardt Renz wrote: > Hi, > > I try to understand the OSGi specification -- and during that > process I have some questions, which may be trivial, but it seems > that they are not explicitly addressed in the specification. > > [1] The resolving process, as described in 3.7 of the spec, > tries to wire bundles according to the constraints given in > the manifests of the bundle. Is this process based _only_ > on the declarations in the bundles' manifests? >
Yes, > [2] It seems obvious that a bundle may export some package, > that is containted in the bundle. And it can import the > very same package, to allow the substitution of the package. > Can a bundle export a package that it does _not_ contain, > i.e. _reexport_ an imported package? > Yes, this is possible with require-bundle. > [3] An Example: > Bundle0: contains P0, imports P0 > Bundle1: exports P0, imports P0 > Equinox wires Bundle0 to Bundle1 for P0 > The consequence are errors at runtime. > Does the OSGi Specification take for granted, that developers > don't do things like in this example? > The spec assumes that you follow the rules set by the spec. So, if you give faulty metadata, then you only have yourself to blame. > [4] When the framework tries to resolve the dependencies of > a new installed package, does it _recalculate_ the wiring between > bundles that it has already established? > The spec may allow this, but it does not require it. In many cases you would not want to recalculate already established wiring, because it would require bringing down bundles, which is disruptive. However, in some cases, it may not be possible to load new functionality without re-wiring existing bundles. > [5] With respect to the uses directive in the Export-Package statement > Richard S. Hall writes in a message in this mailing list: > "Bundle B: Export Package: com.osgi.P1;version=1.0.0;uses:=P2; > For P1 in Bundle B to use P2, Bundle B must either export or import P2, > but in your example above it does neither, so this is not a valid example." > Is the rationale behind that comment, that if P1 uses P2, then P2 has to > be contained in the bundle (and has to be exported) or that this is not the > case (and therefore Bundle B has to import P2)? If yes: why does Richard > say "either...or", could not be both? > Yes, that is an inclusive "or"...sorry for any confusion. -> richard _______________________________________________ osgi-dev mailing list osgi-dev@bundles.osgi.org http://bundles.osgi.org/mailman/listinfo/osgi-dev