felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Alexander.Ber...@finnova.ch>
Subject Extension bundles and package export attributes
Date Tue, 03 Mar 2009 14:10:00 GMT
Hi everybody

I have an extension bundles (a fragment bundle which extends the system bundle) whose Manifest
looks like this:

   Manifest-Version: 1.0
   Bundle-ManifestVersion: 2
   Bundle-Name: Support for Sun Microsystems Inc. Java version 1.6.0_07
   Bundle-SymbolicName: org.example.jvm.support.fragment
   Bundle-Version: 1.0.0
   Fragment-Host: system.bundle;extension:=framework
   Export-Package: com.sun.accessibility.internal.resources;provider=java;version="1.1.1",

Then I have some normal bundles that use DynamicImport-Package (with matching attributes)
to import
the packages exported by that extension bundle (respectively the system bundle).

   DynamicImport-Package: *;bundle-symbolic-name=system.bundle

Or like this

   DynamicImport-Package: *;provider=java

But those DynamicImport-Package headers do not work, the requested packages cannot be resolved
at runtime. If I use the following DynamicImport-Package without any matching attributes:

   DynamicImport-Package: *

then it works as expected and the packages (classes) can be resolved at runtime.

I read the OSGi core specification (4.1) and my interpretation is that the system bundle should
the packages from the extension bundle with all the export attributes as they are provided
by the
"Export-Package" header from the extension bundle. Furthermore the framework should add the
attribute "bundle-symbolic-name" to that exported packages. In other words the attribute "provider"
the implicit attribute "bundle-symbolic-name" should be visible when I call the command "headers
0" in the
Apache felix shell. But the result I get printed on the shell is without that attributes.
The only attribute that
the framework correctly takes and publishes from the extension bundle is the package version

So can anybody tell me if I am wrong or is this a feature/bug in apache felix.

Kind regards
Alex Berger

P.S. Please don't bash on me because I use DynamicImport-Package (I really know what I am
doing) I just
want some clarification about this subject.

To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

View raw message