felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Balázs Zsoldos <balazs.zsol...@everit.biz>
Subject Re: Export packages of OSGi core by default
Date Mon, 01 Sep 2014 15:01:54 GMT
>
> The system bundle exports in Felix are defined by the defaults.properties
> file found inside the JAR, so it’s not necessary to use the Export-Package
> header from the manifest.


I know. I saw it. The packages are also defined in the Export-Package
MANIFEST header. I do not understand why the packages that are listed in
the MANIFEST of a bundle have to even be specified in any configuration.
They are exported by a bundle directly, even if it is the system bundle.

Equinox uses profiles as well, but the packages that are exported directly
by equinox, do not have to be specified anywhere else.

If I have to write a custom launcher that analyzes the MANIFEST of felix
JAR and add the exported packages to the system classpath programmatically,
it seems like a workaround of an unfixed bug to me.


Logic game:

If I create a fragment of the system bundle that exports additional
packages, shall I list those packages in extra configuration as well? If
not, why not? The packages of the host bundle is exported only if I
configure it externally.

Regards,
Balazs



On Mon, Sep 1, 2014 at 4:44 PM, Neil Bartlett <njbartlett@gmail.com> wrote:

> The system bundle exports in Felix are defined by the defaults.properties
> file found inside the JAR, so it’s not necessary to use the Export-Package
> header from the manifest. Actually Equinox works in almost exactly the same
> way; it uses a bunch of J2SE-*.profile files.
>
> You can always write your own launcher that overrides the default
> behaviour. For example the bnd launcher does look for and use the
> Export-Package headers from all JARs that are added to the system classpath
> using -runpath.
>
> Neil
>
> On 1 September 2014 at 15:29:33, Balázs Zsoldos (balazs.zsoldos@everit.biz)
> wrote:
>
> Hi,
>
> this question might have been raised before. If you could drop a link to
> the thread, that would be cool.
>
> In case Equinox is started with an empty
> *org.osgi.framework.system.packages* value, the packages of OSGi core are
> available in the container. This is good in my opinion as the bundle of
> Equinox exports these packages.
>
> If I do the same with Felix, the packages that are specified in the
> Export-Package MANIFEST header of felix JAR, are not available. Why is
> that? These packages are exported by a bundle, the system bundle.
>
> I normally override the system.packages to use only those packages from
> the
> JDK that are necessary. I use everything I can from bundles, even the JDBC
> API. It is very annoying that I have to list all OSGi core packages in the
> system.packages with versions. What if I upgrade felix? I have to check
> the
> package of every version again. I cannot make a felix version independent
> configuration.
>
> Thanks and regards,
> *Balázs **Zsoldos*
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message