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 16:39:35 GMT
Thanks a lot for the answers! I think I get it now.

Although I think that the packages of OSGi core should be always be part of
the system packages (even if the system.packages is overridden), I can
accept that it is not as these packages are not system packages.

I will find a workaround for now (launcher or extension bundle that
contains the Export-Package header). However, I am not sure that this is a
right long-term solution.

Probably a new name, "framework packages" should be introduced. This would
eliminate the confusion. They are provided by the framework and they are
always available. These packages are the ones that are defined by the OSGi
core spec.

*Zsoldos Balázs*
Rendszertervező | Software architect


+36 70 594 9234 | balazs.zsoldos@everit.biz

*EverIT Kft.*
1137 Budapest, Katona József utca 17. III. em. 2.
http://www.everit.biz I info@everit.biz


Ezen üzenet és annak bármely csatolt anyaga bizalmas, jogi védelem alatt
áll, a nyilvános közléstől védett. Az üzenetet kizárólag a címzett, illetve
az általa meghatalmazottak használhatják fel. Ha Ön nem az üzenet
címzettje, úgy kérjük, hogy telefonon, vagy e-mail-ben értesítse erről az
üzenet küldőjét és törölje az üzenetet, valamint annak összes csatolt
mellékletét a rendszeréből. Ha Ön nem az üzenet címzettje, abban az esetben
tilos az üzenetet vagy annak bármely csatolt mellékletét lemásolnia,
elmentenie, az üzenet tartalmát bárkivel közölnie vagy azzal visszaélnie.


This message and any attachment are confidential and are legally
privileged. It is intended solely for the use of the individual or entity
to whom it is addressed and others authorised to receive it. If you are not
the intended recipient, please telephone or email the sender and delete
this message and any attachment from your system. Please note that any
dissemination, distribution, copying or use of or reliance upon the
information contained in and transmitted with this e-mail by or to anyone
other than the recipient designated above by the sender is unauthorised and
strictly prohibited.


On Mon, Sep 1, 2014 at 5:57 PM, Richard S. Hall <heavy@ungoverned.org>
wrote:

> On 9/1/14, 11:01 , Balázs Zsoldos 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.
>>>
>>
>> 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.
>>
>
> The framework is not a bundle. The fact that it has an Export-Package
> manifest entry is purely because it is packaged by Maven Bundle Plugin.
> Those bundle-related entries should probably be removed to avoid confusion
> like yours.
>
>
>
>> Equinox uses profiles as well, but the packages that are exported directly
>> by equinox, do not have to be specified anywhere else.
>>
>
> I think the spec says something about using a reasonable default if
> nothing is specified...not sure if it defines what that default it, but I
> don't think so.
>
>
>
>> 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.
>>
>
> I'm not sure there'd be much analyzing going on, just load the
> default.properties file and use the system.packages value minus the JRE
> variable as your system.packages value for your launcher.
>
> However, I agree that it could be easier. What might possibly be better is
> just somehow allowing the ${jre-?} property to be overwritten in the config
> properties so you could set it to empty or whatever. Currently, it is not
> possible to override default configuration properties with system
> properties.
>
>
>
>>
>> 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.
>>
>
> This has nothing to do with anything in this discussion. System bundle
> fragments are handled at run time are their handling is defined by the spec.
>
> -> richard
>
>
>
>> 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*
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

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