Glyn Normington <[EMAIL PROTECTED]> wrote on 05/06/2008 08:04:28 AM: > > The Platform rewrites the manifests of the bundles of an application > (i.e. a PAR file) to use mandatory matching attributes to form a > scope. For example the following bundle of an application called > "MyApp" version 1.0: > > Manifest-Version: 1.0 > Bundle-Name: MyBundle > Bundle-ManifestVersion: 2 > Bundle-SymbolicName: MyBundle > Export-Package: my.package.p > Bundle-Version: 1 > > is scoped to: > > Manifest-Version: 1.0 > Bundle-Name: MyBundle > Platform-Scope: MyApp-1 > Bundle-ManifestVersion: 2 > Bundle-SymbolicName: MyApp-1-MyBundle > Export-Package: > my.package.p;platform_scope="MyApp-1";mandatory:="platform_scope" > Bundle-Version: 1 >
Is Platform-Scope simply syntactic sugar for a matching attributes and mandatory directives? Does Import-Bundle allow for matching attributes so you can get access to packages with mandatory directives? What about Import-Library, how does this all map to the transitive bundles included in a library? > > import-library is converted into package imports during manifest > rewriting, so you get the clean semantics of import-package with none > of the semantic rough edges of require-bundle. What happens when you use Import-Bundle on more than one bundle that exports the same package? This would be the typical "split" package case with Require-Bundle. I assume the first one listed wins since the framework does not allow a bundle to import the same package more than once with Import-Package. What about if you use Import-Bundle on another bundle that uses Require-Bundle with visibility:=reexport? Do you also import all the packages exported by the Required Bundle? I am also interested in some implementation details on how you do the manifest rewriting (perhaps this can be taken off line but I will ask here to start). I assume you are using the Equinox adaptor hooks to transform the bundle manifests on bundle installation. I am wandering what you do for cases where Import-Bundle refers to a bundle that is not yet installed. Do you rewrite the manifest again once the imported bundle is installed? I am asking because the Equinox AspectJ incubator project does similar things and they had to work through some issues to make sure the updates happened reliably. Tom