You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Balázs Zsoldos <ba...@everit.biz> on 2015/10/27 15:00:38 UTC
System packages should not contain osgi.core packages (packages that
are exported by the framework)
Hi,
I asked this 1-2 years ago, but I think it is worthy to ask it again.
Are you sure that the set of system packages should include the OSGi core
packages?
In my understanding:
- system packages are the ones coming from outside of the OSGi container
- osgi core packages are offered by the framework bundle, but they are
not system packages
In practice:
- If I specify org.osgi.system.packages property for equinox, I do not
have to define the packages implemented by the framework
- If I specify the same property for felix, I must copy-paste the
packages of osgi.core always
Do you think there is a use-case when osgi.core packages offered by the
framework should be excluded from the exported packages of the system
bundle? I think Equinox has the right behavior here.
Do you see any chance to change this behavior in the future?
Kind regards,
*Balázs **Zsoldos*
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/27/15 13:33 , Balázs Zsoldos wrote:
>> As an application developer, I don't need to implement the extender
>> pattern since framework developers have done that for me. It's all about
>> layers and perspective.
>
> As a technology developer, how would you implement an extender pattern
> without the framework packages? You could not. If those packages are not
> exported by the system bundle, you cannot implement the extender pattern.
> As an application developer, you could not import a bundle that implements
> the extender pattern, as the bundle would not resolve.
>
> You mean that the Framework developers should implement technologies like
> Declarative Services and include it into the Framework?
I was using the term "framework developers" in the general sense, not as
in OSGi framework. DS provides application developers a framework for
creating OSGi applications without dependencies on OSGi API. But really,
this is just an argument over semantics and is not germane to the real
issue.
From my perspective, you cannot define system.packages as a value that
depends on framework implementation details to know what the value is.
-> richard
>
>
> On Tue, Oct 27, 2015 at 6:27 PM, Richard S. Hall <he...@ungoverned.org>
> wrote:
>
>> On 10/27/15 13:14 , Balázs Zsoldos wrote:
>>
>>> That is not my interpretation. System packages are those packages provided
>>>> by the system bundle. From a wiring perspective, all of the JRE packages
>>>> look like they are coming from the system bundle just like the OSGi core
>>>> packages, so your distinction doesn't really make sense to me.
>>>>
>>> Seems that we are different :). I interpret rules based on use-cases. I
>>> cannot find any use-case where I wanted to handle framework packages like
>>> JDK packages. On the other hand, I see use-cases where I want to handle
>>> them separately.
>>>
>> It is much more consistent to defines system.packages like,
>> "system.packages represents all packages that will be exported by the
>> system bundle", instead of something like "system.packages represents all
>> packages exported by the system bundle plus some additional packages that
>> will tacked on but may vary by framework implementation".
>>
>>
>>> Wrong. The extender pattern is based almost wholly around such an
>>> approach.
>>>
>>>
>>> How would you implement the extender pattern without the framework
>>> packages?
>>>
>> As an application developer, I don't need to implement the extender
>> pattern since framework developers have done that for me. It's all about
>> layers and perspective.
>>
>> -> richard
>>
>>
>>
>>>
>>> On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <he...@ungoverned.org>
>>> wrote:
>>>
>>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>>> @David:
>>>>> I know about the *org.osgi.framework.system.**packages.extra* property,
>>>>> but
>>>>> that is about another use-case.
>>>>>
>>>>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>>>>> list
>>>>> of system packages.
>>>>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>>>>> the system packages.
>>>>>
>>>>> I want to reduce the list of system packages as some packages are coming
>>>>> from bundles. More specifically, I want to list only those packages
>>>>> that I
>>>>> actually need from the JDK. Reason: Many packages are incomplete or
>>>>> buggy
>>>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>>>
>>>>> @Andy:
>>>>>
>>>>> The text at
>>>>>
>>>>>
>>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>> says:* Framework launching property identifying packages which the
>>>>> system
>>>>> bundle must export.*
>>>>>
>>>>> "Must" does not mean that only those packages should be exported by the
>>>>> system bundle.
>>>>>
>>>>> @Everyone:
>>>>>
>>>>> Questions:
>>>>>
>>>>> - What is the exact meaning of system packages from the
>>>>> perspective of
>>>>> this setting? In my opinion, the list of packages that are coming
>>>>> outside
>>>>> the OSGi container.
>>>>>
>>>>> That is not my interpretation. System packages are those packages
>>>> provided
>>>> by the system bundle. From a wiring perspective, all of the JRE packages
>>>> look like they are coming from the system bundle just like the OSGi core
>>>> packages, so your distinction doesn't really make sense to me.
>>>>
>>>>
>>>> org.osgi.* packages do not come outside from the OSGi
>>>>
>>>>> container.
>>>>> - Could the org.osgi.* packages come from custom bundles? I think,
>>>>> no.
>>>>> - Can you write an application that does not need any of the
>>>>> org.osgi.*
>>>>> package? I think you cannot.At least one bundle has to implement an
>>>>> Activator to have any kind of functionality in the system.
>>>>> Otherwise
>>>>> the
>>>>> bundles will be resolved, but they will do nothing (not even a
>>>>> static
>>>>> block
>>>>> will be called).
>>>>>
>>>>> Wrong. The extender pattern is based almost wholly around such an
>>>> approach.
>>>>
>>>> -> richard
>>>>
>>>> - Can you imagine any use-case where exporting org.osgi.* packages
>>>> by
>>>>
>>>>> the system bundle could cause any issue? I cannot.
>>>>> - Is it an extra work that org.osgi.* packages have to be appended
>>>>> if
>>>>> system.packages are overridden? Yes, always.
>>>>>
>>>>> If we answer these questions, we will come to the conclusion (at least I
>>>>> :)
>>>>> ) that org.osgi.* packages should always be exported by the system
>>>>> bundle.
>>>>> They are not in the scope of the meaning of system.packages setting.
>>>>>
>>>>>
>>>>> Kind regards,
>>>>> *Balázs **Zsoldos*
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>>>> david.bosschaert@gmail.com> wrote:
>>>>>
>>>>> Yes, that's precisely what the
>>>>>
>>>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>>>> you don't need to remember what the framework puts on
>>>>>> org.osgi.framework.system.packages in order to augment it.
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> David
>>>>>>
>>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>>>>
>>>>>> If you are trying to extend the set of packages exported by the system
>>>>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>>>>> default value used by the framework, and hence must include the
>>>>>>> packaged
>>>>>>> that are expected to be supplied by the framework.
>>>>>>>
>>>>>>> See
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>>
>>>>>> --Andy
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>>>
>>>>>>> balazs.zsoldos@everit.biz>
>>>>>> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
>>>>>>>> again.
>>>>>>>>
>>>>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>>>>
>>>>>>>> core
>>>>>>> packages?
>>>>>>>
>>>>>>>> In my understanding:
>>>>>>>>
>>>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>>>
>>>>>>>> container
>>>>>>> - osgi core packages are offered by the framework bundle, but
>>>>>>> they
>>>>>>> are
>>>>>>> not system packages
>>>>>>>
>>>>>>>> In practice:
>>>>>>>>
>>>>>>>> - If I specify org.osgi.system.packages property for equinox, I
>>>>>>>> do
>>>>>>>>
>>>>>>>> not
>>>>>>> have to define the packages implemented by the framework
>>>>>>>
>>>>>>>> - If I specify the same property for felix, I must copy-paste
>>>>>>>> the
>>>>>>>> packages of osgi.core always
>>>>>>>>
>>>>>>>> Do you think there is a use-case when osgi.core packages offered by
>>>>>>>> the
>>>>>>>> framework should be excluded from the exported packages of the system
>>>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>>>
>>>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>>>
>>>>>>>> Kind regards,
>>>>>>>> *Balázs **Zsoldos*
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Balázs Zsoldos <ba...@everit.biz>.
Hi,
As an outcome of the discussion, I created two issues in Jira:
https://issues.apache.org/jira/browse/FELIX-5089
https://issues.apache.org/jira/browse/FELIX-5090
Regards,
*Balázs **Zsoldos*
On Tue, Oct 27, 2015 at 11:51 PM, Richard S. Hall <he...@ungoverned.org>
wrote:
>
> > On Oct 27, 2015, at 18:45, Balázs Zsoldos <ba...@everit.biz>
> wrote:
> >
> >>
> >> As an application developer, you don’t need to import anything from
> >> extender bundles.
> >> I would estimate that 90% of my bundles do not import anything from the
> >> core OSGi framework, and I almost *never* write a BundleActivator.
> >
> >
> > Probably "Import" was not the right word. As an application developer,
> you
> > either have to implement BundleActivator, or use some technology that
> > implements the extender pattern. That technology must either implement
> > BundleActivator or use another technology that implements another
> extender
> > pattern. And so on...
> >
> > If org.osgi.framework is not part of the system packages, at least one of
> > the bundles will not be able to resolve (the one that implements
> > BundleActivator). As a result, no code will be executed in any of the
> > bundles. (It can be executed if someone starts the framework
> > programmatically than gets a class type from one of the bundles than
> > instantiates it with reflection... I do not think anybody wants to do
> this).
> >
> > In other words: The org.osgi.framework must ALWAYS export the
> > org.osgi.framework package, otherwise no business logic will be executed.
>
> This portion of the conversation has definitely gotten off track and I am
> to blame since I was splitting hairs that shouldn’t have been split…
>
> Having said that, though, I did once create a custom launcher that simply
> probed installed JAR files for some metadata and kicked started the
> application from the outside (effectively, it was the extender pattern
> implemented directly in a framework launcher). This work really nicely,
> because it allowed the installed JAR files to benefit from module metadata,
> encapsulate, and dependency resolution, but there was no code in the
> application with any OSGi awareness. So, technically, in that case, the
> system bundle needn’t have exported any OSGi packages at all, since the
> launcher got access to them via the class path.
>
> See what kind of fun stuff you can do? :-)
>
> -> richard
>
> >
> >
> > On Tue, Oct 27, 2015 at 11:18 PM, Neil Bartlett <nj...@gmail.com>
> > wrote:
> >
> >>
> >>> On 27 Oct 2015, at 17:33, Balázs Zsoldos <ba...@everit.biz>
> >> wrote:
> >>>
> >>>>
> >>>> As an application developer, I don't need to implement the extender
> >>>> pattern since framework developers have done that for me. It's all
> about
> >>>> layers and perspective.
> >>>
> >>>
> >>> As a technology developer, how would you implement an extender pattern
> >>> without the framework packages? You could not. If those packages are
> not
> >>> exported by the system bundle, you cannot implement the extender
> pattern.
> >>> As an application developer, you could not import a bundle that
> >> implements
> >>> the extender pattern, as the bundle would not resolve.
> >>
> >>
> >> As an application developer, you don’t need to import anything from
> >> extender bundles.
> >>
> >> I would estimate that 90% of my bundles do not import anything from the
> >> core OSGi framework, and I almost *never* write a BundleActivator.
> >>
> >> Regards,
> >> Neil
> >>
> >>
> >>>
> >>> You mean that the Framework developers should implement technologies
> like
> >>> Declarative Services and include it into the Framework?
> >>>
> >>>
> >>> On Tue, Oct 27, 2015 at 6:27 PM, Richard S. Hall <heavy@ungoverned.org
> >
> >>> wrote:
> >>>
> >>>> On 10/27/15 13:14 , Balázs Zsoldos wrote:
> >>>>
> >>>>> That is not my interpretation. System packages are those packages
> >> provided
> >>>>>> by the system bundle. From a wiring perspective, all of the JRE
> >> packages
> >>>>>> look like they are coming from the system bundle just like the OSGi
> >> core
> >>>>>> packages, so your distinction doesn't really make sense to me.
> >>>>>>
> >>>>>
> >>>>> Seems that we are different :). I interpret rules based on
> use-cases. I
> >>>>> cannot find any use-case where I wanted to handle framework packages
> >> like
> >>>>> JDK packages. On the other hand, I see use-cases where I want to
> handle
> >>>>> them separately.
> >>>>>
> >>>>
> >>>> It is much more consistent to defines system.packages like,
> >>>> "system.packages represents all packages that will be exported by the
> >>>> system bundle", instead of something like "system.packages represents
> >> all
> >>>> packages exported by the system bundle plus some additional packages
> >> that
> >>>> will tacked on but may vary by framework implementation".
> >>>>
> >>>>
> >>>>> Wrong. The extender pattern is based almost wholly around such an
> >>>>> approach.
> >>>>>
> >>>>>
> >>>>> How would you implement the extender pattern without the framework
> >>>>> packages?
> >>>>>
> >>>>
> >>>> As an application developer, I don't need to implement the extender
> >>>> pattern since framework developers have done that for me. It's all
> about
> >>>> layers and perspective.
> >>>>
> >>>> -> richard
> >>>>
> >>>>
> >>>>
> >>>>>
> >>>>>
> >>>>> On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <
> heavy@ungoverned.org
> >>>
> >>>>> wrote:
> >>>>>
> >>>>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
> >>>>>>
> >>>>>> @David:
> >>>>>>>
> >>>>>>> I know about the *org.osgi.framework.system.**packages.extra*
> >> property,
> >>>>>>> but
> >>>>>>> that is about another use-case.
> >>>>>>>
> >>>>>>> *org.osgi.framework.system.**packages.extra *can be used to extend
> >> the
> >>>>>>> list
> >>>>>>> of system packages.
> >>>>>>> *org.osgi.framework.system.**packages* can be used to reduce the
> >> list of
> >>>>>>> the system packages.
> >>>>>>>
> >>>>>>> I want to reduce the list of system packages as some packages are
> >> coming
> >>>>>>> from bundles. More specifically, I want to list only those packages
> >>>>>>> that I
> >>>>>>> actually need from the JDK. Reason: Many packages are incomplete or
> >>>>>>> buggy
> >>>>>>> in the JDK: javax.transaction.*, javax.xml.*...
> >>>>>>>
> >>>>>>> @Andy:
> >>>>>>>
> >>>>>>> The text at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
> >>>>>>> says:* Framework launching property identifying packages which the
> >>>>>>> system
> >>>>>>> bundle must export.*
> >>>>>>>
> >>>>>>> "Must" does not mean that only those packages should be exported by
> >> the
> >>>>>>> system bundle.
> >>>>>>>
> >>>>>>> @Everyone:
> >>>>>>>
> >>>>>>> Questions:
> >>>>>>>
> >>>>>>> - What is the exact meaning of system packages from the
> >>>>>>> perspective of
> >>>>>>> this setting? In my opinion, the list of packages that are
> coming
> >>>>>>> outside
> >>>>>>> the OSGi container.
> >>>>>>>
> >>>>>>> That is not my interpretation. System packages are those packages
> >>>>>> provided
> >>>>>> by the system bundle. From a wiring perspective, all of the JRE
> >> packages
> >>>>>> look like they are coming from the system bundle just like the OSGi
> >> core
> >>>>>> packages, so your distinction doesn't really make sense to me.
> >>>>>>
> >>>>>>
> >>>>>> org.osgi.* packages do not come outside from the OSGi
> >>>>>>
> >>>>>>> container.
> >>>>>>> - Could the org.osgi.* packages come from custom bundles? I
> >> think,
> >>>>>>> no.
> >>>>>>> - Can you write an application that does not need any of the
> >>>>>>> org.osgi.*
> >>>>>>> package? I think you cannot.At least one bundle has to implement
> >> an
> >>>>>>> Activator to have any kind of functionality in the system.
> >>>>>>> Otherwise
> >>>>>>> the
> >>>>>>> bundles will be resolved, but they will do nothing (not even a
> >>>>>>> static
> >>>>>>> block
> >>>>>>> will be called).
> >>>>>>>
> >>>>>>> Wrong. The extender pattern is based almost wholly around such an
> >>>>>> approach.
> >>>>>>
> >>>>>> -> richard
> >>>>>>
> >>>>>> - Can you imagine any use-case where exporting org.osgi.*
> packages
> >>>>>> by
> >>>>>>
> >>>>>>> the system bundle could cause any issue? I cannot.
> >>>>>>> - Is it an extra work that org.osgi.* packages have to be
> >> appended
> >>>>>>> if
> >>>>>>> system.packages are overridden? Yes, always.
> >>>>>>>
> >>>>>>> If we answer these questions, we will come to the conclusion (at
> >> least I
> >>>>>>> :)
> >>>>>>> ) that org.osgi.* packages should always be exported by the system
> >>>>>>> bundle.
> >>>>>>> They are not in the scope of the meaning of system.packages
> setting.
> >>>>>>>
> >>>>>>>
> >>>>>>> Kind regards,
> >>>>>>> *Balázs **Zsoldos*
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
> >>>>>>> david.bosschaert@gmail.com> wrote:
> >>>>>>>
> >>>>>>> Yes, that's precisely what the
> >>>>>>>
> >>>>>>>> org.osgi.framework.system.packages.extra was designed for. That
> way
> >>>>>>>> you don't need to remember what the framework puts on
> >>>>>>>> org.osgi.framework.system.packages in order to augment it.
> >>>>>>>>
> >>>>>>>> Best regards,
> >>>>>>>>
> >>>>>>>> David
> >>>>>>>>
> >>>>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com>
> >> wrote:
> >>>>>>>>
> >>>>>>>> If you are trying to extend the set of packages exported by the
> >> system
> >>>>>>>>> bundle, you should use org.osgi.framework.system.packages.extra.
> >> By
> >>>>>>>>> specifying org.osgi.framework.system.packages you are overriding
> >> the
> >>>>>>>>> default value used by the framework, and hence must include the
> >>>>>>>>> packaged
> >>>>>>>>> that are expected to be supplied by the framework.
> >>>>>>>>>
> >>>>>>>>> See
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>
> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
> >>>>>>>>
> >>>>>>>> --Andy
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
> >>>>>>>>>
> >>>>>>>>> balazs.zsoldos@everit.biz>
> >>>>>>>>
> >>>>>>>> wrote:
> >>>>>>>>>
> >>>>>>>>> Hi,
> >>>>>>>>>
> >>>>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
> >>>>>>>>>> again.
> >>>>>>>>>>
> >>>>>>>>>> Are you sure that the set of system packages should include the
> >> OSGi
> >>>>>>>>>>
> >>>>>>>>>> core
> >>>>>>>>> packages?
> >>>>>>>>>
> >>>>>>>>>> In my understanding:
> >>>>>>>>>>
> >>>>>>>>>> - system packages are the ones coming from outside of the
> OSGi
> >>>>>>>>>>
> >>>>>>>>>> container
> >>>>>>>>> - osgi core packages are offered by the framework bundle, but
> >>>>>>>>> they
> >>>>>>>>> are
> >>>>>>>>> not system packages
> >>>>>>>>>
> >>>>>>>>>> In practice:
> >>>>>>>>>>
> >>>>>>>>>> - If I specify org.osgi.system.packages property for equinox,
> >> I
> >>>>>>>>>> do
> >>>>>>>>>>
> >>>>>>>>>> not
> >>>>>>>>> have to define the packages implemented by the framework
> >>>>>>>>>
> >>>>>>>>>> - If I specify the same property for felix, I must copy-paste
> >>>>>>>>>> the
> >>>>>>>>>> packages of osgi.core always
> >>>>>>>>>>
> >>>>>>>>>> Do you think there is a use-case when osgi.core packages offered
> >> by
> >>>>>>>>>> the
> >>>>>>>>>> framework should be excluded from the exported packages of the
> >> system
> >>>>>>>>>> bundle? I think Equinox has the right behavior here.
> >>>>>>>>>>
> >>>>>>>>>> Do you see any chance to change this behavior in the future?
> >>>>>>>>>>
> >>>>>>>>>> Kind regards,
> >>>>>>>>>> *Balázs **Zsoldos*
> >>>>>>>>>>
> >>>>>>>>>>
> >> ---------------------------------------------------------------------
> >>>>>>>>>>
> >>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: System packages should not contain osgi.core packages (packages that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
> On Oct 27, 2015, at 18:45, Balázs Zsoldos <ba...@everit.biz> wrote:
>
>>
>> As an application developer, you don’t need to import anything from
>> extender bundles.
>> I would estimate that 90% of my bundles do not import anything from the
>> core OSGi framework, and I almost *never* write a BundleActivator.
>
>
> Probably "Import" was not the right word. As an application developer, you
> either have to implement BundleActivator, or use some technology that
> implements the extender pattern. That technology must either implement
> BundleActivator or use another technology that implements another extender
> pattern. And so on...
>
> If org.osgi.framework is not part of the system packages, at least one of
> the bundles will not be able to resolve (the one that implements
> BundleActivator). As a result, no code will be executed in any of the
> bundles. (It can be executed if someone starts the framework
> programmatically than gets a class type from one of the bundles than
> instantiates it with reflection... I do not think anybody wants to do this).
>
> In other words: The org.osgi.framework must ALWAYS export the
> org.osgi.framework package, otherwise no business logic will be executed.
This portion of the conversation has definitely gotten off track and I am to blame since I was splitting hairs that shouldn’t have been split…
Having said that, though, I did once create a custom launcher that simply probed installed JAR files for some metadata and kicked started the application from the outside (effectively, it was the extender pattern implemented directly in a framework launcher). This work really nicely, because it allowed the installed JAR files to benefit from module metadata, encapsulate, and dependency resolution, but there was no code in the application with any OSGi awareness. So, technically, in that case, the system bundle needn’t have exported any OSGi packages at all, since the launcher got access to them via the class path.
See what kind of fun stuff you can do? :-)
-> richard
>
>
> On Tue, Oct 27, 2015 at 11:18 PM, Neil Bartlett <nj...@gmail.com>
> wrote:
>
>>
>>> On 27 Oct 2015, at 17:33, Balázs Zsoldos <ba...@everit.biz>
>> wrote:
>>>
>>>>
>>>> As an application developer, I don't need to implement the extender
>>>> pattern since framework developers have done that for me. It's all about
>>>> layers and perspective.
>>>
>>>
>>> As a technology developer, how would you implement an extender pattern
>>> without the framework packages? You could not. If those packages are not
>>> exported by the system bundle, you cannot implement the extender pattern.
>>> As an application developer, you could not import a bundle that
>> implements
>>> the extender pattern, as the bundle would not resolve.
>>
>>
>> As an application developer, you don’t need to import anything from
>> extender bundles.
>>
>> I would estimate that 90% of my bundles do not import anything from the
>> core OSGi framework, and I almost *never* write a BundleActivator.
>>
>> Regards,
>> Neil
>>
>>
>>>
>>> You mean that the Framework developers should implement technologies like
>>> Declarative Services and include it into the Framework?
>>>
>>>
>>> On Tue, Oct 27, 2015 at 6:27 PM, Richard S. Hall <he...@ungoverned.org>
>>> wrote:
>>>
>>>> On 10/27/15 13:14 , Balázs Zsoldos wrote:
>>>>
>>>>> That is not my interpretation. System packages are those packages
>> provided
>>>>>> by the system bundle. From a wiring perspective, all of the JRE
>> packages
>>>>>> look like they are coming from the system bundle just like the OSGi
>> core
>>>>>> packages, so your distinction doesn't really make sense to me.
>>>>>>
>>>>>
>>>>> Seems that we are different :). I interpret rules based on use-cases. I
>>>>> cannot find any use-case where I wanted to handle framework packages
>> like
>>>>> JDK packages. On the other hand, I see use-cases where I want to handle
>>>>> them separately.
>>>>>
>>>>
>>>> It is much more consistent to defines system.packages like,
>>>> "system.packages represents all packages that will be exported by the
>>>> system bundle", instead of something like "system.packages represents
>> all
>>>> packages exported by the system bundle plus some additional packages
>> that
>>>> will tacked on but may vary by framework implementation".
>>>>
>>>>
>>>>> Wrong. The extender pattern is based almost wholly around such an
>>>>> approach.
>>>>>
>>>>>
>>>>> How would you implement the extender pattern without the framework
>>>>> packages?
>>>>>
>>>>
>>>> As an application developer, I don't need to implement the extender
>>>> pattern since framework developers have done that for me. It's all about
>>>> layers and perspective.
>>>>
>>>> -> richard
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <heavy@ungoverned.org
>>>
>>>>> wrote:
>>>>>
>>>>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>>>>>
>>>>>> @David:
>>>>>>>
>>>>>>> I know about the *org.osgi.framework.system.**packages.extra*
>> property,
>>>>>>> but
>>>>>>> that is about another use-case.
>>>>>>>
>>>>>>> *org.osgi.framework.system.**packages.extra *can be used to extend
>> the
>>>>>>> list
>>>>>>> of system packages.
>>>>>>> *org.osgi.framework.system.**packages* can be used to reduce the
>> list of
>>>>>>> the system packages.
>>>>>>>
>>>>>>> I want to reduce the list of system packages as some packages are
>> coming
>>>>>>> from bundles. More specifically, I want to list only those packages
>>>>>>> that I
>>>>>>> actually need from the JDK. Reason: Many packages are incomplete or
>>>>>>> buggy
>>>>>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>>>>>
>>>>>>> @Andy:
>>>>>>>
>>>>>>> The text at
>>>>>>>
>>>>>>>
>>>>>>>
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>>> says:* Framework launching property identifying packages which the
>>>>>>> system
>>>>>>> bundle must export.*
>>>>>>>
>>>>>>> "Must" does not mean that only those packages should be exported by
>> the
>>>>>>> system bundle.
>>>>>>>
>>>>>>> @Everyone:
>>>>>>>
>>>>>>> Questions:
>>>>>>>
>>>>>>> - What is the exact meaning of system packages from the
>>>>>>> perspective of
>>>>>>> this setting? In my opinion, the list of packages that are coming
>>>>>>> outside
>>>>>>> the OSGi container.
>>>>>>>
>>>>>>> That is not my interpretation. System packages are those packages
>>>>>> provided
>>>>>> by the system bundle. From a wiring perspective, all of the JRE
>> packages
>>>>>> look like they are coming from the system bundle just like the OSGi
>> core
>>>>>> packages, so your distinction doesn't really make sense to me.
>>>>>>
>>>>>>
>>>>>> org.osgi.* packages do not come outside from the OSGi
>>>>>>
>>>>>>> container.
>>>>>>> - Could the org.osgi.* packages come from custom bundles? I
>> think,
>>>>>>> no.
>>>>>>> - Can you write an application that does not need any of the
>>>>>>> org.osgi.*
>>>>>>> package? I think you cannot.At least one bundle has to implement
>> an
>>>>>>> Activator to have any kind of functionality in the system.
>>>>>>> Otherwise
>>>>>>> the
>>>>>>> bundles will be resolved, but they will do nothing (not even a
>>>>>>> static
>>>>>>> block
>>>>>>> will be called).
>>>>>>>
>>>>>>> Wrong. The extender pattern is based almost wholly around such an
>>>>>> approach.
>>>>>>
>>>>>> -> richard
>>>>>>
>>>>>> - Can you imagine any use-case where exporting org.osgi.* packages
>>>>>> by
>>>>>>
>>>>>>> the system bundle could cause any issue? I cannot.
>>>>>>> - Is it an extra work that org.osgi.* packages have to be
>> appended
>>>>>>> if
>>>>>>> system.packages are overridden? Yes, always.
>>>>>>>
>>>>>>> If we answer these questions, we will come to the conclusion (at
>> least I
>>>>>>> :)
>>>>>>> ) that org.osgi.* packages should always be exported by the system
>>>>>>> bundle.
>>>>>>> They are not in the scope of the meaning of system.packages setting.
>>>>>>>
>>>>>>>
>>>>>>> Kind regards,
>>>>>>> *Balázs **Zsoldos*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>>>>>> david.bosschaert@gmail.com> wrote:
>>>>>>>
>>>>>>> Yes, that's precisely what the
>>>>>>>
>>>>>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>>>>>> you don't need to remember what the framework puts on
>>>>>>>> org.osgi.framework.system.packages in order to augment it.
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com>
>> wrote:
>>>>>>>>
>>>>>>>> If you are trying to extend the set of packages exported by the
>> system
>>>>>>>>> bundle, you should use org.osgi.framework.system.packages.extra.
>> By
>>>>>>>>> specifying org.osgi.framework.system.packages you are overriding
>> the
>>>>>>>>> default value used by the framework, and hence must include the
>>>>>>>>> packaged
>>>>>>>>> that are expected to be supplied by the framework.
>>>>>>>>>
>>>>>>>>> See
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>>>>
>>>>>>>> --Andy
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>>>>>
>>>>>>>>> balazs.zsoldos@everit.biz>
>>>>>>>>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
>>>>>>>>>> again.
>>>>>>>>>>
>>>>>>>>>> Are you sure that the set of system packages should include the
>> OSGi
>>>>>>>>>>
>>>>>>>>>> core
>>>>>>>>> packages?
>>>>>>>>>
>>>>>>>>>> In my understanding:
>>>>>>>>>>
>>>>>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>>>>>
>>>>>>>>>> container
>>>>>>>>> - osgi core packages are offered by the framework bundle, but
>>>>>>>>> they
>>>>>>>>> are
>>>>>>>>> not system packages
>>>>>>>>>
>>>>>>>>>> In practice:
>>>>>>>>>>
>>>>>>>>>> - If I specify org.osgi.system.packages property for equinox,
>> I
>>>>>>>>>> do
>>>>>>>>>>
>>>>>>>>>> not
>>>>>>>>> have to define the packages implemented by the framework
>>>>>>>>>
>>>>>>>>>> - If I specify the same property for felix, I must copy-paste
>>>>>>>>>> the
>>>>>>>>>> packages of osgi.core always
>>>>>>>>>>
>>>>>>>>>> Do you think there is a use-case when osgi.core packages offered
>> by
>>>>>>>>>> the
>>>>>>>>>> framework should be excluded from the exported packages of the
>> system
>>>>>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>>>>>
>>>>>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>>>>>
>>>>>>>>>> Kind regards,
>>>>>>>>>> *Balázs **Zsoldos*
>>>>>>>>>>
>>>>>>>>>>
>> ---------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages that are exported by the framework)
Posted by Neil Bartlett <nj...@gmail.com>.
> On 27 Oct 2015, at 22:45, Balázs Zsoldos <ba...@everit.biz> wrote:
>
>>
>> As an application developer, you don’t need to import anything from
>> extender bundles.
>> I would estimate that 90% of my bundles do not import anything from the
>> core OSGi framework, and I almost *never* write a BundleActivator.
>
>
> Probably "Import" was not the right word. As an application developer, you
> either have to implement BundleActivator, or use some technology that
> implements the extender pattern. That technology must either implement
> BundleActivator or use another technology that implements another extender
> pattern. And so on...
>
> If org.osgi.framework is not part of the system packages, at least one of
> the bundles will not be able to resolve (the one that implements
> BundleActivator). As a result, no code will be executed in any of the
> bundles. (It can be executed if someone starts the framework
> programmatically than gets a class type from one of the bundles than
> instantiates it with reflection... I do not think anybody wants to do this).
>
> In other words: The org.osgi.framework must ALWAYS export the
> org.osgi.framework package, otherwise no business logic will be executed.
Umm… yes. Luckily it already does this.
Sorry, struggling to see the deeper point you are making.
>
>
> On Tue, Oct 27, 2015 at 11:18 PM, Neil Bartlett <nj...@gmail.com>
> wrote:
>
>>
>>> On 27 Oct 2015, at 17:33, Balázs Zsoldos <ba...@everit.biz>
>> wrote:
>>>
>>>>
>>>> As an application developer, I don't need to implement the extender
>>>> pattern since framework developers have done that for me. It's all about
>>>> layers and perspective.
>>>
>>>
>>> As a technology developer, how would you implement an extender pattern
>>> without the framework packages? You could not. If those packages are not
>>> exported by the system bundle, you cannot implement the extender pattern.
>>> As an application developer, you could not import a bundle that
>> implements
>>> the extender pattern, as the bundle would not resolve.
>>
>>
>> As an application developer, you don’t need to import anything from
>> extender bundles.
>>
>> I would estimate that 90% of my bundles do not import anything from the
>> core OSGi framework, and I almost *never* write a BundleActivator.
>>
>> Regards,
>> Neil
>>
>>
>>>
>>> You mean that the Framework developers should implement technologies like
>>> Declarative Services and include it into the Framework?
>>>
>>>
>>> On Tue, Oct 27, 2015 at 6:27 PM, Richard S. Hall <he...@ungoverned.org>
>>> wrote:
>>>
>>>> On 10/27/15 13:14 , Balázs Zsoldos wrote:
>>>>
>>>>> That is not my interpretation. System packages are those packages
>> provided
>>>>>> by the system bundle. From a wiring perspective, all of the JRE
>> packages
>>>>>> look like they are coming from the system bundle just like the OSGi
>> core
>>>>>> packages, so your distinction doesn't really make sense to me.
>>>>>>
>>>>>
>>>>> Seems that we are different :). I interpret rules based on use-cases. I
>>>>> cannot find any use-case where I wanted to handle framework packages
>> like
>>>>> JDK packages. On the other hand, I see use-cases where I want to handle
>>>>> them separately.
>>>>>
>>>>
>>>> It is much more consistent to defines system.packages like,
>>>> "system.packages represents all packages that will be exported by the
>>>> system bundle", instead of something like "system.packages represents
>> all
>>>> packages exported by the system bundle plus some additional packages
>> that
>>>> will tacked on but may vary by framework implementation".
>>>>
>>>>
>>>>> Wrong. The extender pattern is based almost wholly around such an
>>>>> approach.
>>>>>
>>>>>
>>>>> How would you implement the extender pattern without the framework
>>>>> packages?
>>>>>
>>>>
>>>> As an application developer, I don't need to implement the extender
>>>> pattern since framework developers have done that for me. It's all about
>>>> layers and perspective.
>>>>
>>>> -> richard
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <heavy@ungoverned.org
>>>
>>>>> wrote:
>>>>>
>>>>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>>>>>
>>>>>> @David:
>>>>>>>
>>>>>>> I know about the *org.osgi.framework.system.**packages.extra*
>> property,
>>>>>>> but
>>>>>>> that is about another use-case.
>>>>>>>
>>>>>>> *org.osgi.framework.system.**packages.extra *can be used to extend
>> the
>>>>>>> list
>>>>>>> of system packages.
>>>>>>> *org.osgi.framework.system.**packages* can be used to reduce the
>> list of
>>>>>>> the system packages.
>>>>>>>
>>>>>>> I want to reduce the list of system packages as some packages are
>> coming
>>>>>>> from bundles. More specifically, I want to list only those packages
>>>>>>> that I
>>>>>>> actually need from the JDK. Reason: Many packages are incomplete or
>>>>>>> buggy
>>>>>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>>>>>
>>>>>>> @Andy:
>>>>>>>
>>>>>>> The text at
>>>>>>>
>>>>>>>
>>>>>>>
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>>> says:* Framework launching property identifying packages which the
>>>>>>> system
>>>>>>> bundle must export.*
>>>>>>>
>>>>>>> "Must" does not mean that only those packages should be exported by
>> the
>>>>>>> system bundle.
>>>>>>>
>>>>>>> @Everyone:
>>>>>>>
>>>>>>> Questions:
>>>>>>>
>>>>>>> - What is the exact meaning of system packages from the
>>>>>>> perspective of
>>>>>>> this setting? In my opinion, the list of packages that are coming
>>>>>>> outside
>>>>>>> the OSGi container.
>>>>>>>
>>>>>>> That is not my interpretation. System packages are those packages
>>>>>> provided
>>>>>> by the system bundle. From a wiring perspective, all of the JRE
>> packages
>>>>>> look like they are coming from the system bundle just like the OSGi
>> core
>>>>>> packages, so your distinction doesn't really make sense to me.
>>>>>>
>>>>>>
>>>>>> org.osgi.* packages do not come outside from the OSGi
>>>>>>
>>>>>>> container.
>>>>>>> - Could the org.osgi.* packages come from custom bundles? I
>> think,
>>>>>>> no.
>>>>>>> - Can you write an application that does not need any of the
>>>>>>> org.osgi.*
>>>>>>> package? I think you cannot.At least one bundle has to implement
>> an
>>>>>>> Activator to have any kind of functionality in the system.
>>>>>>> Otherwise
>>>>>>> the
>>>>>>> bundles will be resolved, but they will do nothing (not even a
>>>>>>> static
>>>>>>> block
>>>>>>> will be called).
>>>>>>>
>>>>>>> Wrong. The extender pattern is based almost wholly around such an
>>>>>> approach.
>>>>>>
>>>>>> -> richard
>>>>>>
>>>>>> - Can you imagine any use-case where exporting org.osgi.* packages
>>>>>> by
>>>>>>
>>>>>>> the system bundle could cause any issue? I cannot.
>>>>>>> - Is it an extra work that org.osgi.* packages have to be
>> appended
>>>>>>> if
>>>>>>> system.packages are overridden? Yes, always.
>>>>>>>
>>>>>>> If we answer these questions, we will come to the conclusion (at
>> least I
>>>>>>> :)
>>>>>>> ) that org.osgi.* packages should always be exported by the system
>>>>>>> bundle.
>>>>>>> They are not in the scope of the meaning of system.packages setting.
>>>>>>>
>>>>>>>
>>>>>>> Kind regards,
>>>>>>> *Balázs **Zsoldos*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>>>>>> david.bosschaert@gmail.com> wrote:
>>>>>>>
>>>>>>> Yes, that's precisely what the
>>>>>>>
>>>>>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>>>>>> you don't need to remember what the framework puts on
>>>>>>>> org.osgi.framework.system.packages in order to augment it.
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com>
>> wrote:
>>>>>>>>
>>>>>>>> If you are trying to extend the set of packages exported by the
>> system
>>>>>>>>> bundle, you should use org.osgi.framework.system.packages.extra.
>> By
>>>>>>>>> specifying org.osgi.framework.system.packages you are overriding
>> the
>>>>>>>>> default value used by the framework, and hence must include the
>>>>>>>>> packaged
>>>>>>>>> that are expected to be supplied by the framework.
>>>>>>>>>
>>>>>>>>> See
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>>>>
>>>>>>>> --Andy
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>>>>>
>>>>>>>>> balazs.zsoldos@everit.biz>
>>>>>>>>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
>>>>>>>>>> again.
>>>>>>>>>>
>>>>>>>>>> Are you sure that the set of system packages should include the
>> OSGi
>>>>>>>>>>
>>>>>>>>>> core
>>>>>>>>> packages?
>>>>>>>>>
>>>>>>>>>> In my understanding:
>>>>>>>>>>
>>>>>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>>>>>
>>>>>>>>>> container
>>>>>>>>> - osgi core packages are offered by the framework bundle, but
>>>>>>>>> they
>>>>>>>>> are
>>>>>>>>> not system packages
>>>>>>>>>
>>>>>>>>>> In practice:
>>>>>>>>>>
>>>>>>>>>> - If I specify org.osgi.system.packages property for equinox,
>> I
>>>>>>>>>> do
>>>>>>>>>>
>>>>>>>>>> not
>>>>>>>>> have to define the packages implemented by the framework
>>>>>>>>>
>>>>>>>>>> - If I specify the same property for felix, I must copy-paste
>>>>>>>>>> the
>>>>>>>>>> packages of osgi.core always
>>>>>>>>>>
>>>>>>>>>> Do you think there is a use-case when osgi.core packages offered
>> by
>>>>>>>>>> the
>>>>>>>>>> framework should be excluded from the exported packages of the
>> system
>>>>>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>>>>>
>>>>>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>>>>>
>>>>>>>>>> Kind regards,
>>>>>>>>>> *Balázs **Zsoldos*
>>>>>>>>>>
>>>>>>>>>>
>> ---------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Balázs Zsoldos <ba...@everit.biz>.
>
> As an application developer, you don’t need to import anything from
> extender bundles.
> I would estimate that 90% of my bundles do not import anything from the
> core OSGi framework, and I almost *never* write a BundleActivator.
Probably "Import" was not the right word. As an application developer, you
either have to implement BundleActivator, or use some technology that
implements the extender pattern. That technology must either implement
BundleActivator or use another technology that implements another extender
pattern. And so on...
If org.osgi.framework is not part of the system packages, at least one of
the bundles will not be able to resolve (the one that implements
BundleActivator). As a result, no code will be executed in any of the
bundles. (It can be executed if someone starts the framework
programmatically than gets a class type from one of the bundles than
instantiates it with reflection... I do not think anybody wants to do this).
In other words: The org.osgi.framework must ALWAYS export the
org.osgi.framework package, otherwise no business logic will be executed.
On Tue, Oct 27, 2015 at 11:18 PM, Neil Bartlett <nj...@gmail.com>
wrote:
>
> > On 27 Oct 2015, at 17:33, Balázs Zsoldos <ba...@everit.biz>
> wrote:
> >
> >>
> >> As an application developer, I don't need to implement the extender
> >> pattern since framework developers have done that for me. It's all about
> >> layers and perspective.
> >
> >
> > As a technology developer, how would you implement an extender pattern
> > without the framework packages? You could not. If those packages are not
> > exported by the system bundle, you cannot implement the extender pattern.
> > As an application developer, you could not import a bundle that
> implements
> > the extender pattern, as the bundle would not resolve.
>
>
> As an application developer, you don’t need to import anything from
> extender bundles.
>
> I would estimate that 90% of my bundles do not import anything from the
> core OSGi framework, and I almost *never* write a BundleActivator.
>
> Regards,
> Neil
>
>
> >
> > You mean that the Framework developers should implement technologies like
> > Declarative Services and include it into the Framework?
> >
> >
> > On Tue, Oct 27, 2015 at 6:27 PM, Richard S. Hall <he...@ungoverned.org>
> > wrote:
> >
> >> On 10/27/15 13:14 , Balázs Zsoldos wrote:
> >>
> >>> That is not my interpretation. System packages are those packages
> provided
> >>>> by the system bundle. From a wiring perspective, all of the JRE
> packages
> >>>> look like they are coming from the system bundle just like the OSGi
> core
> >>>> packages, so your distinction doesn't really make sense to me.
> >>>>
> >>>
> >>> Seems that we are different :). I interpret rules based on use-cases. I
> >>> cannot find any use-case where I wanted to handle framework packages
> like
> >>> JDK packages. On the other hand, I see use-cases where I want to handle
> >>> them separately.
> >>>
> >>
> >> It is much more consistent to defines system.packages like,
> >> "system.packages represents all packages that will be exported by the
> >> system bundle", instead of something like "system.packages represents
> all
> >> packages exported by the system bundle plus some additional packages
> that
> >> will tacked on but may vary by framework implementation".
> >>
> >>
> >>> Wrong. The extender pattern is based almost wholly around such an
> >>> approach.
> >>>
> >>>
> >>> How would you implement the extender pattern without the framework
> >>> packages?
> >>>
> >>
> >> As an application developer, I don't need to implement the extender
> >> pattern since framework developers have done that for me. It's all about
> >> layers and perspective.
> >>
> >> -> richard
> >>
> >>
> >>
> >>>
> >>>
> >>> On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <heavy@ungoverned.org
> >
> >>> wrote:
> >>>
> >>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
> >>>>
> >>>> @David:
> >>>>>
> >>>>> I know about the *org.osgi.framework.system.**packages.extra*
> property,
> >>>>> but
> >>>>> that is about another use-case.
> >>>>>
> >>>>> *org.osgi.framework.system.**packages.extra *can be used to extend
> the
> >>>>> list
> >>>>> of system packages.
> >>>>> *org.osgi.framework.system.**packages* can be used to reduce the
> list of
> >>>>> the system packages.
> >>>>>
> >>>>> I want to reduce the list of system packages as some packages are
> coming
> >>>>> from bundles. More specifically, I want to list only those packages
> >>>>> that I
> >>>>> actually need from the JDK. Reason: Many packages are incomplete or
> >>>>> buggy
> >>>>> in the JDK: javax.transaction.*, javax.xml.*...
> >>>>>
> >>>>> @Andy:
> >>>>>
> >>>>> The text at
> >>>>>
> >>>>>
> >>>>>
> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
> >>>>> says:* Framework launching property identifying packages which the
> >>>>> system
> >>>>> bundle must export.*
> >>>>>
> >>>>> "Must" does not mean that only those packages should be exported by
> the
> >>>>> system bundle.
> >>>>>
> >>>>> @Everyone:
> >>>>>
> >>>>> Questions:
> >>>>>
> >>>>> - What is the exact meaning of system packages from the
> >>>>> perspective of
> >>>>> this setting? In my opinion, the list of packages that are coming
> >>>>> outside
> >>>>> the OSGi container.
> >>>>>
> >>>>> That is not my interpretation. System packages are those packages
> >>>> provided
> >>>> by the system bundle. From a wiring perspective, all of the JRE
> packages
> >>>> look like they are coming from the system bundle just like the OSGi
> core
> >>>> packages, so your distinction doesn't really make sense to me.
> >>>>
> >>>>
> >>>> org.osgi.* packages do not come outside from the OSGi
> >>>>
> >>>>> container.
> >>>>> - Could the org.osgi.* packages come from custom bundles? I
> think,
> >>>>> no.
> >>>>> - Can you write an application that does not need any of the
> >>>>> org.osgi.*
> >>>>> package? I think you cannot.At least one bundle has to implement
> an
> >>>>> Activator to have any kind of functionality in the system.
> >>>>> Otherwise
> >>>>> the
> >>>>> bundles will be resolved, but they will do nothing (not even a
> >>>>> static
> >>>>> block
> >>>>> will be called).
> >>>>>
> >>>>> Wrong. The extender pattern is based almost wholly around such an
> >>>> approach.
> >>>>
> >>>> -> richard
> >>>>
> >>>> - Can you imagine any use-case where exporting org.osgi.* packages
> >>>> by
> >>>>
> >>>>> the system bundle could cause any issue? I cannot.
> >>>>> - Is it an extra work that org.osgi.* packages have to be
> appended
> >>>>> if
> >>>>> system.packages are overridden? Yes, always.
> >>>>>
> >>>>> If we answer these questions, we will come to the conclusion (at
> least I
> >>>>> :)
> >>>>> ) that org.osgi.* packages should always be exported by the system
> >>>>> bundle.
> >>>>> They are not in the scope of the meaning of system.packages setting.
> >>>>>
> >>>>>
> >>>>> Kind regards,
> >>>>> *Balázs **Zsoldos*
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
> >>>>> david.bosschaert@gmail.com> wrote:
> >>>>>
> >>>>> Yes, that's precisely what the
> >>>>>
> >>>>>> org.osgi.framework.system.packages.extra was designed for. That way
> >>>>>> you don't need to remember what the framework puts on
> >>>>>> org.osgi.framework.system.packages in order to augment it.
> >>>>>>
> >>>>>> Best regards,
> >>>>>>
> >>>>>> David
> >>>>>>
> >>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com>
> wrote:
> >>>>>>
> >>>>>> If you are trying to extend the set of packages exported by the
> system
> >>>>>>> bundle, you should use org.osgi.framework.system.packages.extra.
> By
> >>>>>>> specifying org.osgi.framework.system.packages you are overriding
> the
> >>>>>>> default value used by the framework, and hence must include the
> >>>>>>> packaged
> >>>>>>> that are expected to be supplied by the framework.
> >>>>>>>
> >>>>>>> See
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
> >>>>>>
> >>>>>> --Andy
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
> >>>>>>>
> >>>>>>> balazs.zsoldos@everit.biz>
> >>>>>>
> >>>>>> wrote:
> >>>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
> >>>>>>>> again.
> >>>>>>>>
> >>>>>>>> Are you sure that the set of system packages should include the
> OSGi
> >>>>>>>>
> >>>>>>>> core
> >>>>>>> packages?
> >>>>>>>
> >>>>>>>> In my understanding:
> >>>>>>>>
> >>>>>>>> - system packages are the ones coming from outside of the OSGi
> >>>>>>>>
> >>>>>>>> container
> >>>>>>> - osgi core packages are offered by the framework bundle, but
> >>>>>>> they
> >>>>>>> are
> >>>>>>> not system packages
> >>>>>>>
> >>>>>>>> In practice:
> >>>>>>>>
> >>>>>>>> - If I specify org.osgi.system.packages property for equinox,
> I
> >>>>>>>> do
> >>>>>>>>
> >>>>>>>> not
> >>>>>>> have to define the packages implemented by the framework
> >>>>>>>
> >>>>>>>> - If I specify the same property for felix, I must copy-paste
> >>>>>>>> the
> >>>>>>>> packages of osgi.core always
> >>>>>>>>
> >>>>>>>> Do you think there is a use-case when osgi.core packages offered
> by
> >>>>>>>> the
> >>>>>>>> framework should be excluded from the exported packages of the
> system
> >>>>>>>> bundle? I think Equinox has the right behavior here.
> >>>>>>>>
> >>>>>>>> Do you see any chance to change this behavior in the future?
> >>>>>>>>
> >>>>>>>> Kind regards,
> >>>>>>>> *Balázs **Zsoldos*
> >>>>>>>>
> >>>>>>>>
> ---------------------------------------------------------------------
> >>>>>>>>
> >>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>
> >>>>
> >>>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: System packages should not contain osgi.core packages (packages that are exported by the framework)
Posted by Neil Bartlett <nj...@gmail.com>.
> On 27 Oct 2015, at 17:33, Balázs Zsoldos <ba...@everit.biz> wrote:
>
>>
>> As an application developer, I don't need to implement the extender
>> pattern since framework developers have done that for me. It's all about
>> layers and perspective.
>
>
> As a technology developer, how would you implement an extender pattern
> without the framework packages? You could not. If those packages are not
> exported by the system bundle, you cannot implement the extender pattern.
> As an application developer, you could not import a bundle that implements
> the extender pattern, as the bundle would not resolve.
As an application developer, you don’t need to import anything from extender bundles.
I would estimate that 90% of my bundles do not import anything from the core OSGi framework, and I almost *never* write a BundleActivator.
Regards,
Neil
>
> You mean that the Framework developers should implement technologies like
> Declarative Services and include it into the Framework?
>
>
> On Tue, Oct 27, 2015 at 6:27 PM, Richard S. Hall <he...@ungoverned.org>
> wrote:
>
>> On 10/27/15 13:14 , Balázs Zsoldos wrote:
>>
>>> That is not my interpretation. System packages are those packages provided
>>>> by the system bundle. From a wiring perspective, all of the JRE packages
>>>> look like they are coming from the system bundle just like the OSGi core
>>>> packages, so your distinction doesn't really make sense to me.
>>>>
>>>
>>> Seems that we are different :). I interpret rules based on use-cases. I
>>> cannot find any use-case where I wanted to handle framework packages like
>>> JDK packages. On the other hand, I see use-cases where I want to handle
>>> them separately.
>>>
>>
>> It is much more consistent to defines system.packages like,
>> "system.packages represents all packages that will be exported by the
>> system bundle", instead of something like "system.packages represents all
>> packages exported by the system bundle plus some additional packages that
>> will tacked on but may vary by framework implementation".
>>
>>
>>> Wrong. The extender pattern is based almost wholly around such an
>>> approach.
>>>
>>>
>>> How would you implement the extender pattern without the framework
>>> packages?
>>>
>>
>> As an application developer, I don't need to implement the extender
>> pattern since framework developers have done that for me. It's all about
>> layers and perspective.
>>
>> -> richard
>>
>>
>>
>>>
>>>
>>> On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <he...@ungoverned.org>
>>> wrote:
>>>
>>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>>>
>>>> @David:
>>>>>
>>>>> I know about the *org.osgi.framework.system.**packages.extra* property,
>>>>> but
>>>>> that is about another use-case.
>>>>>
>>>>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>>>>> list
>>>>> of system packages.
>>>>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>>>>> the system packages.
>>>>>
>>>>> I want to reduce the list of system packages as some packages are coming
>>>>> from bundles. More specifically, I want to list only those packages
>>>>> that I
>>>>> actually need from the JDK. Reason: Many packages are incomplete or
>>>>> buggy
>>>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>>>
>>>>> @Andy:
>>>>>
>>>>> The text at
>>>>>
>>>>>
>>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>> says:* Framework launching property identifying packages which the
>>>>> system
>>>>> bundle must export.*
>>>>>
>>>>> "Must" does not mean that only those packages should be exported by the
>>>>> system bundle.
>>>>>
>>>>> @Everyone:
>>>>>
>>>>> Questions:
>>>>>
>>>>> - What is the exact meaning of system packages from the
>>>>> perspective of
>>>>> this setting? In my opinion, the list of packages that are coming
>>>>> outside
>>>>> the OSGi container.
>>>>>
>>>>> That is not my interpretation. System packages are those packages
>>>> provided
>>>> by the system bundle. From a wiring perspective, all of the JRE packages
>>>> look like they are coming from the system bundle just like the OSGi core
>>>> packages, so your distinction doesn't really make sense to me.
>>>>
>>>>
>>>> org.osgi.* packages do not come outside from the OSGi
>>>>
>>>>> container.
>>>>> - Could the org.osgi.* packages come from custom bundles? I think,
>>>>> no.
>>>>> - Can you write an application that does not need any of the
>>>>> org.osgi.*
>>>>> package? I think you cannot.At least one bundle has to implement an
>>>>> Activator to have any kind of functionality in the system.
>>>>> Otherwise
>>>>> the
>>>>> bundles will be resolved, but they will do nothing (not even a
>>>>> static
>>>>> block
>>>>> will be called).
>>>>>
>>>>> Wrong. The extender pattern is based almost wholly around such an
>>>> approach.
>>>>
>>>> -> richard
>>>>
>>>> - Can you imagine any use-case where exporting org.osgi.* packages
>>>> by
>>>>
>>>>> the system bundle could cause any issue? I cannot.
>>>>> - Is it an extra work that org.osgi.* packages have to be appended
>>>>> if
>>>>> system.packages are overridden? Yes, always.
>>>>>
>>>>> If we answer these questions, we will come to the conclusion (at least I
>>>>> :)
>>>>> ) that org.osgi.* packages should always be exported by the system
>>>>> bundle.
>>>>> They are not in the scope of the meaning of system.packages setting.
>>>>>
>>>>>
>>>>> Kind regards,
>>>>> *Balázs **Zsoldos*
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>>>> david.bosschaert@gmail.com> wrote:
>>>>>
>>>>> Yes, that's precisely what the
>>>>>
>>>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>>>> you don't need to remember what the framework puts on
>>>>>> org.osgi.framework.system.packages in order to augment it.
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> David
>>>>>>
>>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>>>>
>>>>>> If you are trying to extend the set of packages exported by the system
>>>>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>>>>> default value used by the framework, and hence must include the
>>>>>>> packaged
>>>>>>> that are expected to be supplied by the framework.
>>>>>>>
>>>>>>> See
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>>
>>>>>> --Andy
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>>>
>>>>>>> balazs.zsoldos@everit.biz>
>>>>>>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
>>>>>>>> again.
>>>>>>>>
>>>>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>>>>
>>>>>>>> core
>>>>>>> packages?
>>>>>>>
>>>>>>>> In my understanding:
>>>>>>>>
>>>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>>>
>>>>>>>> container
>>>>>>> - osgi core packages are offered by the framework bundle, but
>>>>>>> they
>>>>>>> are
>>>>>>> not system packages
>>>>>>>
>>>>>>>> In practice:
>>>>>>>>
>>>>>>>> - If I specify org.osgi.system.packages property for equinox, I
>>>>>>>> do
>>>>>>>>
>>>>>>>> not
>>>>>>> have to define the packages implemented by the framework
>>>>>>>
>>>>>>>> - If I specify the same property for felix, I must copy-paste
>>>>>>>> the
>>>>>>>> packages of osgi.core always
>>>>>>>>
>>>>>>>> Do you think there is a use-case when osgi.core packages offered by
>>>>>>>> the
>>>>>>>> framework should be excluded from the exported packages of the system
>>>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>>>
>>>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>>>
>>>>>>>> Kind regards,
>>>>>>>> *Balázs **Zsoldos*
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Balázs Zsoldos <ba...@everit.biz>.
>
> As an application developer, I don't need to implement the extender
> pattern since framework developers have done that for me. It's all about
> layers and perspective.
As a technology developer, how would you implement an extender pattern
without the framework packages? You could not. If those packages are not
exported by the system bundle, you cannot implement the extender pattern.
As an application developer, you could not import a bundle that implements
the extender pattern, as the bundle would not resolve.
You mean that the Framework developers should implement technologies like
Declarative Services and include it into the Framework?
On Tue, Oct 27, 2015 at 6:27 PM, Richard S. Hall <he...@ungoverned.org>
wrote:
> On 10/27/15 13:14 , Balázs Zsoldos wrote:
>
>> That is not my interpretation. System packages are those packages provided
>>> by the system bundle. From a wiring perspective, all of the JRE packages
>>> look like they are coming from the system bundle just like the OSGi core
>>> packages, so your distinction doesn't really make sense to me.
>>>
>>
>> Seems that we are different :). I interpret rules based on use-cases. I
>> cannot find any use-case where I wanted to handle framework packages like
>> JDK packages. On the other hand, I see use-cases where I want to handle
>> them separately.
>>
>
> It is much more consistent to defines system.packages like,
> "system.packages represents all packages that will be exported by the
> system bundle", instead of something like "system.packages represents all
> packages exported by the system bundle plus some additional packages that
> will tacked on but may vary by framework implementation".
>
>
>> Wrong. The extender pattern is based almost wholly around such an
>> approach.
>>
>>
>> How would you implement the extender pattern without the framework
>> packages?
>>
>
> As an application developer, I don't need to implement the extender
> pattern since framework developers have done that for me. It's all about
> layers and perspective.
>
> -> richard
>
>
>
>>
>>
>> On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <he...@ungoverned.org>
>> wrote:
>>
>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>>
>>> @David:
>>>>
>>>> I know about the *org.osgi.framework.system.**packages.extra* property,
>>>> but
>>>> that is about another use-case.
>>>>
>>>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>>>> list
>>>> of system packages.
>>>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>>>> the system packages.
>>>>
>>>> I want to reduce the list of system packages as some packages are coming
>>>> from bundles. More specifically, I want to list only those packages
>>>> that I
>>>> actually need from the JDK. Reason: Many packages are incomplete or
>>>> buggy
>>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>>
>>>> @Andy:
>>>>
>>>> The text at
>>>>
>>>>
>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>> says:* Framework launching property identifying packages which the
>>>> system
>>>> bundle must export.*
>>>>
>>>> "Must" does not mean that only those packages should be exported by the
>>>> system bundle.
>>>>
>>>> @Everyone:
>>>>
>>>> Questions:
>>>>
>>>> - What is the exact meaning of system packages from the
>>>> perspective of
>>>> this setting? In my opinion, the list of packages that are coming
>>>> outside
>>>> the OSGi container.
>>>>
>>>> That is not my interpretation. System packages are those packages
>>> provided
>>> by the system bundle. From a wiring perspective, all of the JRE packages
>>> look like they are coming from the system bundle just like the OSGi core
>>> packages, so your distinction doesn't really make sense to me.
>>>
>>>
>>> org.osgi.* packages do not come outside from the OSGi
>>>
>>>> container.
>>>> - Could the org.osgi.* packages come from custom bundles? I think,
>>>> no.
>>>> - Can you write an application that does not need any of the
>>>> org.osgi.*
>>>> package? I think you cannot.At least one bundle has to implement an
>>>> Activator to have any kind of functionality in the system.
>>>> Otherwise
>>>> the
>>>> bundles will be resolved, but they will do nothing (not even a
>>>> static
>>>> block
>>>> will be called).
>>>>
>>>> Wrong. The extender pattern is based almost wholly around such an
>>> approach.
>>>
>>> -> richard
>>>
>>> - Can you imagine any use-case where exporting org.osgi.* packages
>>> by
>>>
>>>> the system bundle could cause any issue? I cannot.
>>>> - Is it an extra work that org.osgi.* packages have to be appended
>>>> if
>>>> system.packages are overridden? Yes, always.
>>>>
>>>> If we answer these questions, we will come to the conclusion (at least I
>>>> :)
>>>> ) that org.osgi.* packages should always be exported by the system
>>>> bundle.
>>>> They are not in the scope of the meaning of system.packages setting.
>>>>
>>>>
>>>> Kind regards,
>>>> *Balázs **Zsoldos*
>>>>
>>>>
>>>>
>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>>> david.bosschaert@gmail.com> wrote:
>>>>
>>>> Yes, that's precisely what the
>>>>
>>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>>> you don't need to remember what the framework puts on
>>>>> org.osgi.framework.system.packages in order to augment it.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> David
>>>>>
>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>>>
>>>>> If you are trying to extend the set of packages exported by the system
>>>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>>>> default value used by the framework, and hence must include the
>>>>>> packaged
>>>>>> that are expected to be supplied by the framework.
>>>>>>
>>>>>> See
>>>>>>
>>>>>>
>>>>>>
>>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>
>>>>> --Andy
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>>
>>>>>> balazs.zsoldos@everit.biz>
>>>>>
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
>>>>>>> again.
>>>>>>>
>>>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>>>
>>>>>>> core
>>>>>> packages?
>>>>>>
>>>>>>> In my understanding:
>>>>>>>
>>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>>
>>>>>>> container
>>>>>> - osgi core packages are offered by the framework bundle, but
>>>>>> they
>>>>>> are
>>>>>> not system packages
>>>>>>
>>>>>>> In practice:
>>>>>>>
>>>>>>> - If I specify org.osgi.system.packages property for equinox, I
>>>>>>> do
>>>>>>>
>>>>>>> not
>>>>>> have to define the packages implemented by the framework
>>>>>>
>>>>>>> - If I specify the same property for felix, I must copy-paste
>>>>>>> the
>>>>>>> packages of osgi.core always
>>>>>>>
>>>>>>> Do you think there is a use-case when osgi.core packages offered by
>>>>>>> the
>>>>>>> framework should be excluded from the exported packages of the system
>>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>>
>>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>>
>>>>>>> Kind regards,
>>>>>>> *Balázs **Zsoldos*
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/27/15 13:14 , Balázs Zsoldos wrote:
>> That is not my interpretation. System packages are those packages provided
>> by the system bundle. From a wiring perspective, all of the JRE packages
>> look like they are coming from the system bundle just like the OSGi core
>> packages, so your distinction doesn't really make sense to me.
>
> Seems that we are different :). I interpret rules based on use-cases. I
> cannot find any use-case where I wanted to handle framework packages like
> JDK packages. On the other hand, I see use-cases where I want to handle
> them separately.
It is much more consistent to defines system.packages like,
"system.packages represents all packages that will be exported by the
system bundle", instead of something like "system.packages represents
all packages exported by the system bundle plus some additional packages
that will tacked on but may vary by framework implementation".
>
> Wrong. The extender pattern is based almost wholly around such an approach.
>
>
> How would you implement the extender pattern without the framework packages?
As an application developer, I don't need to implement the extender
pattern since framework developers have done that for me. It's all about
layers and perspective.
-> richard
>
>
>
> On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <he...@ungoverned.org>
> wrote:
>
>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>
>>> @David:
>>>
>>> I know about the *org.osgi.framework.system.**packages.extra* property,
>>> but
>>> that is about another use-case.
>>>
>>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>>> list
>>> of system packages.
>>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>>> the system packages.
>>>
>>> I want to reduce the list of system packages as some packages are coming
>>> from bundles. More specifically, I want to list only those packages that I
>>> actually need from the JDK. Reason: Many packages are incomplete or buggy
>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>
>>> @Andy:
>>>
>>> The text at
>>>
>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>> says:* Framework launching property identifying packages which the
>>> system
>>> bundle must export.*
>>>
>>> "Must" does not mean that only those packages should be exported by the
>>> system bundle.
>>>
>>> @Everyone:
>>>
>>> Questions:
>>>
>>> - What is the exact meaning of system packages from the perspective of
>>> this setting? In my opinion, the list of packages that are coming
>>> outside
>>> the OSGi container.
>>>
>> That is not my interpretation. System packages are those packages provided
>> by the system bundle. From a wiring perspective, all of the JRE packages
>> look like they are coming from the system bundle just like the OSGi core
>> packages, so your distinction doesn't really make sense to me.
>>
>>
>> org.osgi.* packages do not come outside from the OSGi
>>> container.
>>> - Could the org.osgi.* packages come from custom bundles? I think, no.
>>> - Can you write an application that does not need any of the
>>> org.osgi.*
>>> package? I think you cannot.At least one bundle has to implement an
>>> Activator to have any kind of functionality in the system. Otherwise
>>> the
>>> bundles will be resolved, but they will do nothing (not even a static
>>> block
>>> will be called).
>>>
>> Wrong. The extender pattern is based almost wholly around such an approach.
>>
>> -> richard
>>
>> - Can you imagine any use-case where exporting org.osgi.* packages by
>>> the system bundle could cause any issue? I cannot.
>>> - Is it an extra work that org.osgi.* packages have to be appended if
>>> system.packages are overridden? Yes, always.
>>>
>>> If we answer these questions, we will come to the conclusion (at least I
>>> :)
>>> ) that org.osgi.* packages should always be exported by the system bundle.
>>> They are not in the scope of the meaning of system.packages setting.
>>>
>>>
>>> Kind regards,
>>> *Balázs **Zsoldos*
>>>
>>>
>>>
>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>> david.bosschaert@gmail.com> wrote:
>>>
>>> Yes, that's precisely what the
>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>> you don't need to remember what the framework puts on
>>>> org.osgi.framework.system.packages in order to augment it.
>>>>
>>>> Best regards,
>>>>
>>>> David
>>>>
>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>>
>>>>> If you are trying to extend the set of packages exported by the system
>>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>>> default value used by the framework, and hence must include the packaged
>>>>> that are expected to be supplied by the framework.
>>>>>
>>>>> See
>>>>>
>>>>>
>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>
>>>>> --Andy
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>
>>>> balazs.zsoldos@everit.biz>
>>>>
>>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>>>
>>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>>
>>>>> core
>>>>> packages?
>>>>>> In my understanding:
>>>>>>
>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>
>>>>> container
>>>>> - osgi core packages are offered by the framework bundle, but they
>>>>> are
>>>>> not system packages
>>>>>> In practice:
>>>>>>
>>>>>> - If I specify org.osgi.system.packages property for equinox, I do
>>>>>>
>>>>> not
>>>>> have to define the packages implemented by the framework
>>>>>> - If I specify the same property for felix, I must copy-paste the
>>>>>> packages of osgi.core always
>>>>>>
>>>>>> Do you think there is a use-case when osgi.core packages offered by the
>>>>>> framework should be excluded from the exported packages of the system
>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>
>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>
>>>>>> Kind regards,
>>>>>> *Balázs **Zsoldos*
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Balázs Zsoldos <ba...@everit.biz>.
>
> That is not my interpretation. System packages are those packages provided
> by the system bundle. From a wiring perspective, all of the JRE packages
> look like they are coming from the system bundle just like the OSGi core
> packages, so your distinction doesn't really make sense to me.
Seems that we are different :). I interpret rules based on use-cases. I
cannot find any use-case where I wanted to handle framework packages like
JDK packages. On the other hand, I see use-cases where I want to handle
them separately.
Wrong. The extender pattern is based almost wholly around such an approach.
How would you implement the extender pattern without the framework packages?
On Tue, Oct 27, 2015 at 6:04 PM, Richard S. Hall <he...@ungoverned.org>
wrote:
>
> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>
>> @David:
>>
>> I know about the *org.osgi.framework.system.**packages.extra* property,
>> but
>> that is about another use-case.
>>
>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>> list
>> of system packages.
>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>> the system packages.
>>
>> I want to reduce the list of system packages as some packages are coming
>> from bundles. More specifically, I want to list only those packages that I
>> actually need from the JDK. Reason: Many packages are incomplete or buggy
>> in the JDK: javax.transaction.*, javax.xml.*...
>>
>> @Andy:
>>
>> The text at
>>
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>> says:* Framework launching property identifying packages which the
>> system
>> bundle must export.*
>>
>> "Must" does not mean that only those packages should be exported by the
>> system bundle.
>>
>> @Everyone:
>>
>> Questions:
>>
>> - What is the exact meaning of system packages from the perspective of
>> this setting? In my opinion, the list of packages that are coming
>> outside
>> the OSGi container.
>>
>
> That is not my interpretation. System packages are those packages provided
> by the system bundle. From a wiring perspective, all of the JRE packages
> look like they are coming from the system bundle just like the OSGi core
> packages, so your distinction doesn't really make sense to me.
>
>
> org.osgi.* packages do not come outside from the OSGi
>> container.
>> - Could the org.osgi.* packages come from custom bundles? I think, no.
>> - Can you write an application that does not need any of the
>> org.osgi.*
>> package? I think you cannot.At least one bundle has to implement an
>> Activator to have any kind of functionality in the system. Otherwise
>> the
>> bundles will be resolved, but they will do nothing (not even a static
>> block
>> will be called).
>>
>
> Wrong. The extender pattern is based almost wholly around such an approach.
>
> -> richard
>
> - Can you imagine any use-case where exporting org.osgi.* packages by
>> the system bundle could cause any issue? I cannot.
>> - Is it an extra work that org.osgi.* packages have to be appended if
>> system.packages are overridden? Yes, always.
>>
>> If we answer these questions, we will come to the conclusion (at least I
>> :)
>> ) that org.osgi.* packages should always be exported by the system bundle.
>> They are not in the scope of the meaning of system.packages setting.
>>
>>
>> Kind regards,
>> *Balázs **Zsoldos*
>>
>>
>>
>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>> david.bosschaert@gmail.com> wrote:
>>
>> Yes, that's precisely what the
>>> org.osgi.framework.system.packages.extra was designed for. That way
>>> you don't need to remember what the framework puts on
>>> org.osgi.framework.system.packages in order to augment it.
>>>
>>> Best regards,
>>>
>>> David
>>>
>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>
>>>> If you are trying to extend the set of packages exported by the system
>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>> default value used by the framework, and hence must include the packaged
>>>> that are expected to be supplied by the framework.
>>>>
>>>> See
>>>>
>>>>
>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>
>>>>
>>>> --Andy
>>>>
>>>>
>>>>
>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>
>>> balazs.zsoldos@everit.biz>
>>>
>>>> wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>>
>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>
>>>> core
>>>
>>>> packages?
>>>>>
>>>>> In my understanding:
>>>>>
>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>
>>>> container
>>>
>>>> - osgi core packages are offered by the framework bundle, but they
>>>>>
>>>> are
>>>
>>>> not system packages
>>>>>
>>>>> In practice:
>>>>>
>>>>> - If I specify org.osgi.system.packages property for equinox, I do
>>>>>
>>>> not
>>>
>>>> have to define the packages implemented by the framework
>>>>> - If I specify the same property for felix, I must copy-paste the
>>>>> packages of osgi.core always
>>>>>
>>>>> Do you think there is a use-case when osgi.core packages offered by the
>>>>> framework should be excluded from the exported packages of the system
>>>>> bundle? I think Equinox has the right behavior here.
>>>>>
>>>>> Do you see any chance to change this behavior in the future?
>>>>>
>>>>> Kind regards,
>>>>> *Balázs **Zsoldos*
>>>>>
>>>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/27/15 11:27 , Balázs Zsoldos wrote:
> @David:
>
> I know about the *org.osgi.framework.system.**packages.extra* property, but
> that is about another use-case.
>
> *org.osgi.framework.system.**packages.extra *can be used to extend the list
> of system packages.
> *org.osgi.framework.system.**packages* can be used to reduce the list of
> the system packages.
>
> I want to reduce the list of system packages as some packages are coming
> from bundles. More specifically, I want to list only those packages that I
> actually need from the JDK. Reason: Many packages are incomplete or buggy
> in the JDK: javax.transaction.*, javax.xml.*...
>
> @Andy:
>
> The text at
> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
> says:* Framework launching property identifying packages which the system
> bundle must export.*
>
> "Must" does not mean that only those packages should be exported by the
> system bundle.
>
> @Everyone:
>
> Questions:
>
> - What is the exact meaning of system packages from the perspective of
> this setting? In my opinion, the list of packages that are coming outside
> the OSGi container.
That is not my interpretation. System packages are those packages
provided by the system bundle. From a wiring perspective, all of the JRE
packages look like they are coming from the system bundle just like the
OSGi core packages, so your distinction doesn't really make sense to me.
> org.osgi.* packages do not come outside from the OSGi
> container.
> - Could the org.osgi.* packages come from custom bundles? I think, no.
> - Can you write an application that does not need any of the org.osgi.*
> package? I think you cannot.At least one bundle has to implement an
> Activator to have any kind of functionality in the system. Otherwise the
> bundles will be resolved, but they will do nothing (not even a static block
> will be called).
Wrong. The extender pattern is based almost wholly around such an approach.
-> richard
> - Can you imagine any use-case where exporting org.osgi.* packages by
> the system bundle could cause any issue? I cannot.
> - Is it an extra work that org.osgi.* packages have to be appended if
> system.packages are overridden? Yes, always.
>
> If we answer these questions, we will come to the conclusion (at least I :)
> ) that org.osgi.* packages should always be exported by the system bundle.
> They are not in the scope of the meaning of system.packages setting.
>
>
> Kind regards,
> *Balázs **Zsoldos*
>
>
> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
> david.bosschaert@gmail.com> wrote:
>
>> Yes, that's precisely what the
>> org.osgi.framework.system.packages.extra was designed for. That way
>> you don't need to remember what the framework puts on
>> org.osgi.framework.system.packages in order to augment it.
>>
>> Best regards,
>>
>> David
>>
>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>> If you are trying to extend the set of packages exported by the system
>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>> specifying org.osgi.framework.system.packages you are overriding the
>>> default value used by the framework, and hence must include the packaged
>>> that are expected to be supplied by the framework.
>>>
>>> See
>>>
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>
>>> --Andy
>>>
>>>
>>>
>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>> balazs.zsoldos@everit.biz>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>
>>>> Are you sure that the set of system packages should include the OSGi
>> core
>>>> packages?
>>>>
>>>> In my understanding:
>>>>
>>>> - system packages are the ones coming from outside of the OSGi
>> container
>>>> - osgi core packages are offered by the framework bundle, but they
>> are
>>>> not system packages
>>>>
>>>> In practice:
>>>>
>>>> - If I specify org.osgi.system.packages property for equinox, I do
>> not
>>>> have to define the packages implemented by the framework
>>>> - If I specify the same property for felix, I must copy-paste the
>>>> packages of osgi.core always
>>>>
>>>> Do you think there is a use-case when osgi.core packages offered by the
>>>> framework should be excluded from the exported packages of the system
>>>> bundle? I think Equinox has the right behavior here.
>>>>
>>>> Do you see any chance to change this behavior in the future?
>>>>
>>>> Kind regards,
>>>> *Balázs **Zsoldos*
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/27/15 16:10 , Balázs Zsoldos wrote:
> I guess your needs came from an environment I am not familiar with. I have
> never had to use Permissions within OSGi, so I must discontinue the
> argument here (until I get familiar once with OSGi security ;-) ).
>
> Probably the different opinions come from the name "system.packages". If
> there were "framework.packages" and "environment.packages" that would give
> a better separation. The chance of having such discussion has gone long ago.
Considering that the system bundle is called a "system" bundle, then it
would seem that the relationship to "system" packages would be clear... :-)
> Anyway, I would like to ask kindly you if it is possible to implement the
> idea that you (Richard) proposed in one of your previous emails:
>
> org.osgi.framework.system.packages= ${dollar}{framework-exports} \
> ${dollar}{jre-${dollar}{java.specification.version}}
>
> That could save lots of work in the future for developers who want to
> specify explicitly those JDK packages they need. I hope that in one day all
> packages can come from bundles (all, even swing or other built-in
> solutions), and we need to export only the framework packages.
You can certainly create an issue for this...
-> richard
>
>
> On Tue, Oct 27, 2015 at 6:33 PM, Richard S. Hall <he...@ungoverned.org>
> wrote:
>
>> On 10/27/15 13:27 , Balázs Zsoldos wrote:
>>
>>> Also, we used to package some framework services separately (e.g.,
>>>> PackageAdmin, etc.) and some framework still might, so this assumption
>>>> also
>>>> is not correct.
>>>>
>>> I am wondering why PackageAdmin had to be re-implemented. If it was
>>> possible to re-implement it based on other features of OSGi Core, does
>>> that
>>> mean that OSGi Core contained something that it should not have? If some
>>> services can be implemented based on others, they are more like libraries
>>> than part of the core.
>>>
>> I didn't say it was re-implemented, I said it was packaged separately. We
>> still do, for example, package the permission-related services separately.
>> It did, however, use some special hooks to do what it needed to do.
>>
>> -> richard
>>
>>
>>
>>> E.g.: BundleTracker and ServiceTracker is part of a very helpful library.
>>> It can be implemented based on OSGi Core. I am probably alone with the
>>> opinion that is should not have been moved into OSGi Core. Also, it is
>>> another discussion (I am sure this was discussed internally before
>>> releasing OSGi Core 5).
>>>
>>>
>>> On Tue, Oct 27, 2015 at 6:08 PM, Richard S. Hall <he...@ungoverned.org>
>>> wrote:
>>>
>>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>>> @David:
>>>>> I know about the *org.osgi.framework.system.**packages.extra* property,
>>>>> but
>>>>> that is about another use-case.
>>>>>
>>>>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>>>>> list
>>>>> of system packages.
>>>>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>>>>> the system packages.
>>>>>
>>>>> I want to reduce the list of system packages as some packages are coming
>>>>> from bundles. More specifically, I want to list only those packages
>>>>> that I
>>>>> actually need from the JDK. Reason: Many packages are incomplete or
>>>>> buggy
>>>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>>>
>>>>> @Andy:
>>>>>
>>>>> The text at
>>>>>
>>>>>
>>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>> says:* Framework launching property identifying packages which the
>>>>> system
>>>>> bundle must export.*
>>>>>
>>>>> "Must" does not mean that only those packages should be exported by the
>>>>> system bundle.
>>>>>
>>>>> @Everyone:
>>>>>
>>>>> Questions:
>>>>>
>>>>> - What is the exact meaning of system packages from the
>>>>> perspective of
>>>>> this setting? In my opinion, the list of packages that are coming
>>>>> outside
>>>>> the OSGi container. org.osgi.* packages do not come outside from
>>>>> the
>>>>> OSGi
>>>>> container.
>>>>> - Could the org.osgi.* packages come from custom bundles? I think,
>>>>> no.
>>>>> - Can you write an application that does not need any of the
>>>>> org.osgi.*
>>>>> package? I think you cannot. At least one bundle has to implement
>>>>> an
>>>>> Activator to have any kind of functionality in the system.
>>>>> Otherwise
>>>>> the
>>>>> bundles will be resolved, but they will do nothing (not even a
>>>>> static
>>>>> block
>>>>> will be called).
>>>>> - Can you imagine any use-case where exporting org.osgi.* packages
>>>>> by
>>>>> the system bundle could cause any issue? I cannot.
>>>>>
>>>>> Also, we used to package some framework services separately (e.g.,
>>>> PackageAdmin, etc.) and some framework still might, so this assumption
>>>> also
>>>> is not correct.
>>>>
>>>> - Is it an extra work that org.osgi.* packages have to be appended
>>>> if
>>>>
>>>>> system.packages are overridden? Yes, always.
>>>>>
>>>>> Sure, this is correct, but not really relevant to the meaning of system
>>>> packages.
>>>>
>>>> -> richard
>>>>
>>>>
>>>> If we answer these questions, we will come to the conclusion (at least I
>>>>> :)
>>>>> ) that org.osgi.* packages should always be exported by the system
>>>>> bundle.
>>>>> They are not in the scope of the meaning of system.packages setting.
>>>>>
>>>>>
>>>>> Kind regards,
>>>>> *Balázs **Zsoldos*
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>>>> david.bosschaert@gmail.com> wrote:
>>>>>
>>>>> Yes, that's precisely what the
>>>>>
>>>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>>>> you don't need to remember what the framework puts on
>>>>>> org.osgi.framework.system.packages in order to augment it.
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> David
>>>>>>
>>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>>>>
>>>>>> If you are trying to extend the set of packages exported by the system
>>>>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>>>>> default value used by the framework, and hence must include the
>>>>>>> packaged
>>>>>>> that are expected to be supplied by the framework.
>>>>>>>
>>>>>>> See
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>>
>>>>>> --Andy
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>>>
>>>>>>> balazs.zsoldos@everit.biz>
>>>>>> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
>>>>>>>> again.
>>>>>>>>
>>>>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>>>>
>>>>>>>> core
>>>>>>> packages?
>>>>>>>
>>>>>>>> In my understanding:
>>>>>>>>
>>>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>>>
>>>>>>>> container
>>>>>>> - osgi core packages are offered by the framework bundle, but
>>>>>>> they
>>>>>>> are
>>>>>>> not system packages
>>>>>>>
>>>>>>>> In practice:
>>>>>>>>
>>>>>>>> - If I specify org.osgi.system.packages property for equinox, I
>>>>>>>> do
>>>>>>>>
>>>>>>>> not
>>>>>>> have to define the packages implemented by the framework
>>>>>>>
>>>>>>>> - If I specify the same property for felix, I must copy-paste
>>>>>>>> the
>>>>>>>> packages of osgi.core always
>>>>>>>>
>>>>>>>> Do you think there is a use-case when osgi.core packages offered by
>>>>>>>> the
>>>>>>>> framework should be excluded from the exported packages of the system
>>>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>>>
>>>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>>>
>>>>>>>> Kind regards,
>>>>>>>> *Balázs **Zsoldos*
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Balázs Zsoldos <ba...@everit.biz>.
I guess your needs came from an environment I am not familiar with. I have
never had to use Permissions within OSGi, so I must discontinue the
argument here (until I get familiar once with OSGi security ;-) ).
Probably the different opinions come from the name "system.packages". If
there were "framework.packages" and "environment.packages" that would give
a better separation. The chance of having such discussion has gone long ago.
Anyway, I would like to ask kindly you if it is possible to implement the
idea that you (Richard) proposed in one of your previous emails:
org.osgi.framework.system.packages= ${dollar}{framework-exports} \
${dollar}{jre-${dollar}{java.specification.version}}
That could save lots of work in the future for developers who want to
specify explicitly those JDK packages they need. I hope that in one day all
packages can come from bundles (all, even swing or other built-in
solutions), and we need to export only the framework packages.
On Tue, Oct 27, 2015 at 6:33 PM, Richard S. Hall <he...@ungoverned.org>
wrote:
> On 10/27/15 13:27 , Balázs Zsoldos wrote:
>
>> Also, we used to package some framework services separately (e.g.,
>>> PackageAdmin, etc.) and some framework still might, so this assumption
>>> also
>>> is not correct.
>>>
>>
>> I am wondering why PackageAdmin had to be re-implemented. If it was
>> possible to re-implement it based on other features of OSGi Core, does
>> that
>> mean that OSGi Core contained something that it should not have? If some
>> services can be implemented based on others, they are more like libraries
>> than part of the core.
>>
>
> I didn't say it was re-implemented, I said it was packaged separately. We
> still do, for example, package the permission-related services separately.
> It did, however, use some special hooks to do what it needed to do.
>
> -> richard
>
>
>
>> E.g.: BundleTracker and ServiceTracker is part of a very helpful library.
>> It can be implemented based on OSGi Core. I am probably alone with the
>> opinion that is should not have been moved into OSGi Core. Also, it is
>> another discussion (I am sure this was discussed internally before
>> releasing OSGi Core 5).
>>
>>
>> On Tue, Oct 27, 2015 at 6:08 PM, Richard S. Hall <he...@ungoverned.org>
>> wrote:
>>
>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>>
>>> @David:
>>>>
>>>> I know about the *org.osgi.framework.system.**packages.extra* property,
>>>> but
>>>> that is about another use-case.
>>>>
>>>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>>>> list
>>>> of system packages.
>>>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>>>> the system packages.
>>>>
>>>> I want to reduce the list of system packages as some packages are coming
>>>> from bundles. More specifically, I want to list only those packages
>>>> that I
>>>> actually need from the JDK. Reason: Many packages are incomplete or
>>>> buggy
>>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>>
>>>> @Andy:
>>>>
>>>> The text at
>>>>
>>>>
>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>> says:* Framework launching property identifying packages which the
>>>> system
>>>> bundle must export.*
>>>>
>>>> "Must" does not mean that only those packages should be exported by the
>>>> system bundle.
>>>>
>>>> @Everyone:
>>>>
>>>> Questions:
>>>>
>>>> - What is the exact meaning of system packages from the
>>>> perspective of
>>>> this setting? In my opinion, the list of packages that are coming
>>>> outside
>>>> the OSGi container. org.osgi.* packages do not come outside from
>>>> the
>>>> OSGi
>>>> container.
>>>> - Could the org.osgi.* packages come from custom bundles? I think,
>>>> no.
>>>> - Can you write an application that does not need any of the
>>>> org.osgi.*
>>>> package? I think you cannot. At least one bundle has to implement
>>>> an
>>>> Activator to have any kind of functionality in the system.
>>>> Otherwise
>>>> the
>>>> bundles will be resolved, but they will do nothing (not even a
>>>> static
>>>> block
>>>> will be called).
>>>> - Can you imagine any use-case where exporting org.osgi.* packages
>>>> by
>>>> the system bundle could cause any issue? I cannot.
>>>>
>>>> Also, we used to package some framework services separately (e.g.,
>>> PackageAdmin, etc.) and some framework still might, so this assumption
>>> also
>>> is not correct.
>>>
>>> - Is it an extra work that org.osgi.* packages have to be appended
>>> if
>>>
>>>> system.packages are overridden? Yes, always.
>>>>
>>>> Sure, this is correct, but not really relevant to the meaning of system
>>> packages.
>>>
>>> -> richard
>>>
>>>
>>> If we answer these questions, we will come to the conclusion (at least I
>>>> :)
>>>> ) that org.osgi.* packages should always be exported by the system
>>>> bundle.
>>>> They are not in the scope of the meaning of system.packages setting.
>>>>
>>>>
>>>> Kind regards,
>>>> *Balázs **Zsoldos*
>>>>
>>>>
>>>>
>>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>>> david.bosschaert@gmail.com> wrote:
>>>>
>>>> Yes, that's precisely what the
>>>>
>>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>>> you don't need to remember what the framework puts on
>>>>> org.osgi.framework.system.packages in order to augment it.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> David
>>>>>
>>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>>>
>>>>> If you are trying to extend the set of packages exported by the system
>>>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>>>> default value used by the framework, and hence must include the
>>>>>> packaged
>>>>>> that are expected to be supplied by the framework.
>>>>>>
>>>>>> See
>>>>>>
>>>>>>
>>>>>>
>>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>>
>>>>> --Andy
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>>
>>>>>> balazs.zsoldos@everit.biz>
>>>>>
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it
>>>>>>> again.
>>>>>>>
>>>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>>>
>>>>>>> core
>>>>>> packages?
>>>>>>
>>>>>>> In my understanding:
>>>>>>>
>>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>>
>>>>>>> container
>>>>>> - osgi core packages are offered by the framework bundle, but
>>>>>> they
>>>>>> are
>>>>>> not system packages
>>>>>>
>>>>>>> In practice:
>>>>>>>
>>>>>>> - If I specify org.osgi.system.packages property for equinox, I
>>>>>>> do
>>>>>>>
>>>>>>> not
>>>>>> have to define the packages implemented by the framework
>>>>>>
>>>>>>> - If I specify the same property for felix, I must copy-paste
>>>>>>> the
>>>>>>> packages of osgi.core always
>>>>>>>
>>>>>>> Do you think there is a use-case when osgi.core packages offered by
>>>>>>> the
>>>>>>> framework should be excluded from the exported packages of the system
>>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>>
>>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>>
>>>>>>> Kind regards,
>>>>>>> *Balázs **Zsoldos*
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/27/15 13:27 , Balázs Zsoldos wrote:
>> Also, we used to package some framework services separately (e.g.,
>> PackageAdmin, etc.) and some framework still might, so this assumption also
>> is not correct.
>
> I am wondering why PackageAdmin had to be re-implemented. If it was
> possible to re-implement it based on other features of OSGi Core, does that
> mean that OSGi Core contained something that it should not have? If some
> services can be implemented based on others, they are more like libraries
> than part of the core.
I didn't say it was re-implemented, I said it was packaged separately.
We still do, for example, package the permission-related services
separately. It did, however, use some special hooks to do what it needed
to do.
-> richard
>
> E.g.: BundleTracker and ServiceTracker is part of a very helpful library.
> It can be implemented based on OSGi Core. I am probably alone with the
> opinion that is should not have been moved into OSGi Core. Also, it is
> another discussion (I am sure this was discussed internally before
> releasing OSGi Core 5).
>
>
> On Tue, Oct 27, 2015 at 6:08 PM, Richard S. Hall <he...@ungoverned.org>
> wrote:
>
>> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>>
>>> @David:
>>>
>>> I know about the *org.osgi.framework.system.**packages.extra* property,
>>> but
>>> that is about another use-case.
>>>
>>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>>> list
>>> of system packages.
>>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>>> the system packages.
>>>
>>> I want to reduce the list of system packages as some packages are coming
>>> from bundles. More specifically, I want to list only those packages that I
>>> actually need from the JDK. Reason: Many packages are incomplete or buggy
>>> in the JDK: javax.transaction.*, javax.xml.*...
>>>
>>> @Andy:
>>>
>>> The text at
>>>
>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>> says:* Framework launching property identifying packages which the
>>> system
>>> bundle must export.*
>>>
>>> "Must" does not mean that only those packages should be exported by the
>>> system bundle.
>>>
>>> @Everyone:
>>>
>>> Questions:
>>>
>>> - What is the exact meaning of system packages from the perspective of
>>> this setting? In my opinion, the list of packages that are coming
>>> outside
>>> the OSGi container. org.osgi.* packages do not come outside from the
>>> OSGi
>>> container.
>>> - Could the org.osgi.* packages come from custom bundles? I think, no.
>>> - Can you write an application that does not need any of the
>>> org.osgi.*
>>> package? I think you cannot. At least one bundle has to implement an
>>> Activator to have any kind of functionality in the system. Otherwise
>>> the
>>> bundles will be resolved, but they will do nothing (not even a static
>>> block
>>> will be called).
>>> - Can you imagine any use-case where exporting org.osgi.* packages by
>>> the system bundle could cause any issue? I cannot.
>>>
>> Also, we used to package some framework services separately (e.g.,
>> PackageAdmin, etc.) and some framework still might, so this assumption also
>> is not correct.
>>
>> - Is it an extra work that org.osgi.* packages have to be appended if
>>> system.packages are overridden? Yes, always.
>>>
>> Sure, this is correct, but not really relevant to the meaning of system
>> packages.
>>
>> -> richard
>>
>>
>>> If we answer these questions, we will come to the conclusion (at least I
>>> :)
>>> ) that org.osgi.* packages should always be exported by the system bundle.
>>> They are not in the scope of the meaning of system.packages setting.
>>>
>>>
>>> Kind regards,
>>> *Balázs **Zsoldos*
>>>
>>>
>>>
>>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>>> david.bosschaert@gmail.com> wrote:
>>>
>>> Yes, that's precisely what the
>>>> org.osgi.framework.system.packages.extra was designed for. That way
>>>> you don't need to remember what the framework puts on
>>>> org.osgi.framework.system.packages in order to augment it.
>>>>
>>>> Best regards,
>>>>
>>>> David
>>>>
>>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>>
>>>>> If you are trying to extend the set of packages exported by the system
>>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>>> default value used by the framework, and hence must include the packaged
>>>>> that are expected to be supplied by the framework.
>>>>>
>>>>> See
>>>>>
>>>>>
>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>
>>>>> --Andy
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>>
>>>> balazs.zsoldos@everit.biz>
>>>>
>>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>>>
>>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>>
>>>>> core
>>>>> packages?
>>>>>> In my understanding:
>>>>>>
>>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>>
>>>>> container
>>>>> - osgi core packages are offered by the framework bundle, but they
>>>>> are
>>>>> not system packages
>>>>>> In practice:
>>>>>>
>>>>>> - If I specify org.osgi.system.packages property for equinox, I do
>>>>>>
>>>>> not
>>>>> have to define the packages implemented by the framework
>>>>>> - If I specify the same property for felix, I must copy-paste the
>>>>>> packages of osgi.core always
>>>>>>
>>>>>> Do you think there is a use-case when osgi.core packages offered by the
>>>>>> framework should be excluded from the exported packages of the system
>>>>>> bundle? I think Equinox has the right behavior here.
>>>>>>
>>>>>> Do you see any chance to change this behavior in the future?
>>>>>>
>>>>>> Kind regards,
>>>>>> *Balázs **Zsoldos*
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Balázs Zsoldos <ba...@everit.biz>.
>
> Also, we used to package some framework services separately (e.g.,
> PackageAdmin, etc.) and some framework still might, so this assumption also
> is not correct.
I am wondering why PackageAdmin had to be re-implemented. If it was
possible to re-implement it based on other features of OSGi Core, does that
mean that OSGi Core contained something that it should not have? If some
services can be implemented based on others, they are more like libraries
than part of the core.
E.g.: BundleTracker and ServiceTracker is part of a very helpful library.
It can be implemented based on OSGi Core. I am probably alone with the
opinion that is should not have been moved into OSGi Core. Also, it is
another discussion (I am sure this was discussed internally before
releasing OSGi Core 5).
On Tue, Oct 27, 2015 at 6:08 PM, Richard S. Hall <he...@ungoverned.org>
wrote:
> On 10/27/15 11:27 , Balázs Zsoldos wrote:
>
>> @David:
>>
>> I know about the *org.osgi.framework.system.**packages.extra* property,
>> but
>> that is about another use-case.
>>
>> *org.osgi.framework.system.**packages.extra *can be used to extend the
>> list
>> of system packages.
>> *org.osgi.framework.system.**packages* can be used to reduce the list of
>> the system packages.
>>
>> I want to reduce the list of system packages as some packages are coming
>> from bundles. More specifically, I want to list only those packages that I
>> actually need from the JDK. Reason: Many packages are incomplete or buggy
>> in the JDK: javax.transaction.*, javax.xml.*...
>>
>> @Andy:
>>
>> The text at
>>
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>> says:* Framework launching property identifying packages which the
>> system
>> bundle must export.*
>>
>> "Must" does not mean that only those packages should be exported by the
>> system bundle.
>>
>> @Everyone:
>>
>> Questions:
>>
>> - What is the exact meaning of system packages from the perspective of
>> this setting? In my opinion, the list of packages that are coming
>> outside
>> the OSGi container. org.osgi.* packages do not come outside from the
>> OSGi
>> container.
>> - Could the org.osgi.* packages come from custom bundles? I think, no.
>> - Can you write an application that does not need any of the
>> org.osgi.*
>> package? I think you cannot. At least one bundle has to implement an
>> Activator to have any kind of functionality in the system. Otherwise
>> the
>> bundles will be resolved, but they will do nothing (not even a static
>> block
>> will be called).
>> - Can you imagine any use-case where exporting org.osgi.* packages by
>> the system bundle could cause any issue? I cannot.
>>
>
> Also, we used to package some framework services separately (e.g.,
> PackageAdmin, etc.) and some framework still might, so this assumption also
> is not correct.
>
> - Is it an extra work that org.osgi.* packages have to be appended if
>> system.packages are overridden? Yes, always.
>>
>
> Sure, this is correct, but not really relevant to the meaning of system
> packages.
>
> -> richard
>
>
>> If we answer these questions, we will come to the conclusion (at least I
>> :)
>> ) that org.osgi.* packages should always be exported by the system bundle.
>> They are not in the scope of the meaning of system.packages setting.
>>
>>
>> Kind regards,
>> *Balázs **Zsoldos*
>>
>>
>>
>> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
>> david.bosschaert@gmail.com> wrote:
>>
>> Yes, that's precisely what the
>>> org.osgi.framework.system.packages.extra was designed for. That way
>>> you don't need to remember what the framework puts on
>>> org.osgi.framework.system.packages in order to augment it.
>>>
>>> Best regards,
>>>
>>> David
>>>
>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>
>>>> If you are trying to extend the set of packages exported by the system
>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>> default value used by the framework, and hence must include the packaged
>>>> that are expected to be supplied by the framework.
>>>>
>>>> See
>>>>
>>>>
>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>
>>>>
>>>> --Andy
>>>>
>>>>
>>>>
>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>>>
>>> balazs.zsoldos@everit.biz>
>>>
>>>> wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>>
>>>>> Are you sure that the set of system packages should include the OSGi
>>>>>
>>>> core
>>>
>>>> packages?
>>>>>
>>>>> In my understanding:
>>>>>
>>>>> - system packages are the ones coming from outside of the OSGi
>>>>>
>>>> container
>>>
>>>> - osgi core packages are offered by the framework bundle, but they
>>>>>
>>>> are
>>>
>>>> not system packages
>>>>>
>>>>> In practice:
>>>>>
>>>>> - If I specify org.osgi.system.packages property for equinox, I do
>>>>>
>>>> not
>>>
>>>> have to define the packages implemented by the framework
>>>>> - If I specify the same property for felix, I must copy-paste the
>>>>> packages of osgi.core always
>>>>>
>>>>> Do you think there is a use-case when osgi.core packages offered by the
>>>>> framework should be excluded from the exported packages of the system
>>>>> bundle? I think Equinox has the right behavior here.
>>>>>
>>>>> Do you see any chance to change this behavior in the future?
>>>>>
>>>>> Kind regards,
>>>>> *Balázs **Zsoldos*
>>>>>
>>>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/27/15 11:27 , Balázs Zsoldos wrote:
> @David:
>
> I know about the *org.osgi.framework.system.**packages.extra* property, but
> that is about another use-case.
>
> *org.osgi.framework.system.**packages.extra *can be used to extend the list
> of system packages.
> *org.osgi.framework.system.**packages* can be used to reduce the list of
> the system packages.
>
> I want to reduce the list of system packages as some packages are coming
> from bundles. More specifically, I want to list only those packages that I
> actually need from the JDK. Reason: Many packages are incomplete or buggy
> in the JDK: javax.transaction.*, javax.xml.*...
>
> @Andy:
>
> The text at
> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
> says:* Framework launching property identifying packages which the system
> bundle must export.*
>
> "Must" does not mean that only those packages should be exported by the
> system bundle.
>
> @Everyone:
>
> Questions:
>
> - What is the exact meaning of system packages from the perspective of
> this setting? In my opinion, the list of packages that are coming outside
> the OSGi container. org.osgi.* packages do not come outside from the OSGi
> container.
> - Could the org.osgi.* packages come from custom bundles? I think, no.
> - Can you write an application that does not need any of the org.osgi.*
> package? I think you cannot. At least one bundle has to implement an
> Activator to have any kind of functionality in the system. Otherwise the
> bundles will be resolved, but they will do nothing (not even a static block
> will be called).
> - Can you imagine any use-case where exporting org.osgi.* packages by
> the system bundle could cause any issue? I cannot.
Also, we used to package some framework services separately (e.g.,
PackageAdmin, etc.) and some framework still might, so this assumption
also is not correct.
> - Is it an extra work that org.osgi.* packages have to be appended if
> system.packages are overridden? Yes, always.
Sure, this is correct, but not really relevant to the meaning of system
packages.
-> richard
>
> If we answer these questions, we will come to the conclusion (at least I :)
> ) that org.osgi.* packages should always be exported by the system bundle.
> They are not in the scope of the meaning of system.packages setting.
>
>
> Kind regards,
> *Balázs **Zsoldos*
>
>
> On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
> david.bosschaert@gmail.com> wrote:
>
>> Yes, that's precisely what the
>> org.osgi.framework.system.packages.extra was designed for. That way
>> you don't need to remember what the framework puts on
>> org.osgi.framework.system.packages in order to augment it.
>>
>> Best regards,
>>
>> David
>>
>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>> If you are trying to extend the set of packages exported by the system
>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>> specifying org.osgi.framework.system.packages you are overriding the
>>> default value used by the framework, and hence must include the packaged
>>> that are expected to be supplied by the framework.
>>>
>>> See
>>>
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>
>>> --Andy
>>>
>>>
>>>
>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>> balazs.zsoldos@everit.biz>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>
>>>> Are you sure that the set of system packages should include the OSGi
>> core
>>>> packages?
>>>>
>>>> In my understanding:
>>>>
>>>> - system packages are the ones coming from outside of the OSGi
>> container
>>>> - osgi core packages are offered by the framework bundle, but they
>> are
>>>> not system packages
>>>>
>>>> In practice:
>>>>
>>>> - If I specify org.osgi.system.packages property for equinox, I do
>> not
>>>> have to define the packages implemented by the framework
>>>> - If I specify the same property for felix, I must copy-paste the
>>>> packages of osgi.core always
>>>>
>>>> Do you think there is a use-case when osgi.core packages offered by the
>>>> framework should be excluded from the exported packages of the system
>>>> bundle? I think Equinox has the right behavior here.
>>>>
>>>> Do you see any chance to change this behavior in the future?
>>>>
>>>> Kind regards,
>>>> *Balázs **Zsoldos*
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Balázs Zsoldos <ba...@everit.biz>.
@David:
I know about the *org.osgi.framework.system.**packages.extra* property, but
that is about another use-case.
*org.osgi.framework.system.**packages.extra *can be used to extend the list
of system packages.
*org.osgi.framework.system.**packages* can be used to reduce the list of
the system packages.
I want to reduce the list of system packages as some packages are coming
from bundles. More specifically, I want to list only those packages that I
actually need from the JDK. Reason: Many packages are incomplete or buggy
in the JDK: javax.transaction.*, javax.xml.*...
@Andy:
The text at
https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
says:* Framework launching property identifying packages which the system
bundle must export.*
"Must" does not mean that only those packages should be exported by the
system bundle.
@Everyone:
Questions:
- What is the exact meaning of system packages from the perspective of
this setting? In my opinion, the list of packages that are coming outside
the OSGi container. org.osgi.* packages do not come outside from the OSGi
container.
- Could the org.osgi.* packages come from custom bundles? I think, no.
- Can you write an application that does not need any of the org.osgi.*
package? I think you cannot. At least one bundle has to implement an
Activator to have any kind of functionality in the system. Otherwise the
bundles will be resolved, but they will do nothing (not even a static block
will be called).
- Can you imagine any use-case where exporting org.osgi.* packages by
the system bundle could cause any issue? I cannot.
- Is it an extra work that org.osgi.* packages have to be appended if
system.packages are overridden? Yes, always.
If we answer these questions, we will come to the conclusion (at least I :)
) that org.osgi.* packages should always be exported by the system bundle.
They are not in the scope of the meaning of system.packages setting.
Kind regards,
*Balázs **Zsoldos*
On Tue, Oct 27, 2015 at 3:21 PM, David Bosschaert <
david.bosschaert@gmail.com> wrote:
> Yes, that's precisely what the
> org.osgi.framework.system.packages.extra was designed for. That way
> you don't need to remember what the framework puts on
> org.osgi.framework.system.packages in order to augment it.
>
> Best regards,
>
> David
>
> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
> > If you are trying to extend the set of packages exported by the system
> > bundle, you should use org.osgi.framework.system.packages.extra. By
> > specifying org.osgi.framework.system.packages you are overriding the
> > default value used by the framework, and hence must include the packaged
> > that are expected to be supplied by the framework.
> >
> > See
> >
> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
> >
> >
> > --Andy
> >
> >
> >
> > On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
> balazs.zsoldos@everit.biz>
> > wrote:
> >
> >> Hi,
> >>
> >> I asked this 1-2 years ago, but I think it is worthy to ask it again.
> >>
> >> Are you sure that the set of system packages should include the OSGi
> core
> >> packages?
> >>
> >> In my understanding:
> >>
> >> - system packages are the ones coming from outside of the OSGi
> container
> >> - osgi core packages are offered by the framework bundle, but they
> are
> >> not system packages
> >>
> >> In practice:
> >>
> >> - If I specify org.osgi.system.packages property for equinox, I do
> not
> >> have to define the packages implemented by the framework
> >> - If I specify the same property for felix, I must copy-paste the
> >> packages of osgi.core always
> >>
> >> Do you think there is a use-case when osgi.core packages offered by the
> >> framework should be excluded from the exported packages of the system
> >> bundle? I think Equinox has the right behavior here.
> >>
> >> Do you see any chance to change this behavior in the future?
> >>
> >> Kind regards,
> >> *Balázs **Zsoldos*
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Christian Schneider <ch...@die-schneider.net>.
I created an issue and will work on a patch.
https://issues.apache.org/jira/browse/FELIX-5091
Christian
On 27.10.2015 21:32, Richard S. Hall wrote:
> On 10/27/15 16:22 , Christian Schneider wrote:
>> I can only speak for myself but it would help me a lot.
>> How can we determine if it is worthwhile?
>>
>> If you would accept such a patch I can do the implementation of it.
>
> Technically, you might be able to do this as just part of the
> launcher, but I don't have too much time to think about it.
>
> Create an issue and potentially a patch and then start nagging people.
> :-)
>
> -> richard
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/27/15 16:22 , Christian Schneider wrote:
> I can only speak for myself but it would help me a lot.
> How can we determine if it is worthwhile?
>
> If you would accept such a patch I can do the implementation of it.
Technically, you might be able to do this as just part of the launcher,
but I don't have too much time to think about it.
Create an issue and potentially a patch and then start nagging people. :-)
-> richard
>
> Christian
>
> Am 27.10.2015 um 18:11 schrieb Richard S. Hall:
>> On 10/27/15 11:36 , Christian Schneider wrote:
>>> A typical case I have is that I need to remove some packages from
>>> the system packages.
>>>
>>> Would it be possible to have a property like:
>>> org.osgi.framework.system.packages.ignore=javax.transaction
>>>
>>> Or some other way to just specify what we do not want to export?
>>
>> I think something like that was discussed in CPEG at one time, but
>> not really acted upon because it was just an optimization. Certainly,
>> we could have a Felix-specific property if people really thought it
>> was worthwhile.
>>
>> -> richard
>>
>>>
>>> Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Christian Schneider <ch...@die-schneider.net>.
I can only speak for myself but it would help me a lot.
How can we determine if it is worthwhile?
If you would accept such a patch I can do the implementation of it.
Christian
Am 27.10.2015 um 18:11 schrieb Richard S. Hall:
> On 10/27/15 11:36 , Christian Schneider wrote:
>> A typical case I have is that I need to remove some packages from the
>> system packages.
>>
>> Would it be possible to have a property like:
>> org.osgi.framework.system.packages.ignore=javax.transaction
>>
>> Or some other way to just specify what we do not want to export?
>
> I think something like that was discussed in CPEG at one time, but not
> really acted upon because it was just an optimization. Certainly, we
> could have a Felix-specific property if people really thought it was
> worthwhile.
>
> -> richard
>
>>
>> Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 10/27/15 11:36 , Christian Schneider wrote:
> A typical case I have is that I need to remove some packages from the
> system packages.
>
> Would it be possible to have a property like:
> org.osgi.framework.system.packages.ignore=javax.transaction
>
> Or some other way to just specify what we do not want to export?
I think something like that was discussed in CPEG at one time, but not
really acted upon because it was just an optimization. Certainly, we
could have a Felix-specific property if people really thought it was
worthwhile.
-> richard
>
> Christian
>
> On 27.10.2015 15:38, Richard S. Hall wrote:
>> I think it is reasonable to allow someone to hide exports from the
>> system bundle, but that doesn't mean that this process couldn't be
>> improved. For example, we could introduce a new variable
>> ${framework-exports} as an alias to what the framework exports, so
>> then in our default properties file the system.packages could be
>> written something like this:
>>
>> org.osgi.framework.system.packages= ${dollar}{framework-exports} \
>> ${dollar}{jre-${dollar}{java.specification.version}}
>>
>> Thus making it easier for people who want to override system.packages
>> by using our alias.
>>
>> Of course, though, if you just want to add stuff to system packages,
>> then you should be using system.packages.extra like others have
>> suggested.
>>
>> -> richard
>>
>> On 10/27/15 10:21 , David Bosschaert wrote:
>>> Yes, that's precisely what the
>>> org.osgi.framework.system.packages.extra was designed for. That way
>>> you don't need to remember what the framework puts on
>>> org.osgi.framework.system.packages in order to augment it.
>>>
>>> Best regards,
>>>
>>> David
>>>
>>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>>> If you are trying to extend the set of packages exported by the system
>>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>>> specifying org.osgi.framework.system.packages you are overriding the
>>>> default value used by the framework, and hence must include the
>>>> packaged
>>>> that are expected to be supplied by the framework.
>>>>
>>>> See
>>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>>
>>>>
>>>>
>>>> --Andy
>>>>
>>>>
>>>>
>>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos
>>>> <ba...@everit.biz>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>>
>>>>> Are you sure that the set of system packages should include the
>>>>> OSGi core
>>>>> packages?
>>>>>
>>>>> In my understanding:
>>>>>
>>>>> - system packages are the ones coming from outside of the OSGi
>>>>> container
>>>>> - osgi core packages are offered by the framework bundle, but
>>>>> they are
>>>>> not system packages
>>>>>
>>>>> In practice:
>>>>>
>>>>> - If I specify org.osgi.system.packages property for equinox,
>>>>> I do not
>>>>> have to define the packages implemented by the framework
>>>>> - If I specify the same property for felix, I must copy-paste the
>>>>> packages of osgi.core always
>>>>>
>>>>> Do you think there is a use-case when osgi.core packages offered
>>>>> by the
>>>>> framework should be excluded from the exported packages of the system
>>>>> bundle? I think Equinox has the right behavior here.
>>>>>
>>>>> Do you see any chance to change this behavior in the future?
>>>>>
>>>>> Kind regards,
>>>>> *Balázs **Zsoldos*
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Christian Schneider <ch...@die-schneider.net>.
A typical case I have is that I need to remove some packages from the
system packages.
Would it be possible to have a property like:
org.osgi.framework.system.packages.ignore=javax.transaction
Or some other way to just specify what we do not want to export?
Christian
On 27.10.2015 15:38, Richard S. Hall wrote:
> I think it is reasonable to allow someone to hide exports from the
> system bundle, but that doesn't mean that this process couldn't be
> improved. For example, we could introduce a new variable
> ${framework-exports} as an alias to what the framework exports, so
> then in our default properties file the system.packages could be
> written something like this:
>
> org.osgi.framework.system.packages= ${dollar}{framework-exports} \
> ${dollar}{jre-${dollar}{java.specification.version}}
>
> Thus making it easier for people who want to override system.packages
> by using our alias.
>
> Of course, though, if you just want to add stuff to system packages,
> then you should be using system.packages.extra like others have
> suggested.
>
> -> richard
>
> On 10/27/15 10:21 , David Bosschaert wrote:
>> Yes, that's precisely what the
>> org.osgi.framework.system.packages.extra was designed for. That way
>> you don't need to remember what the framework puts on
>> org.osgi.framework.system.packages in order to augment it.
>>
>> Best regards,
>>
>> David
>>
>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>> If you are trying to extend the set of packages exported by the system
>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>> specifying org.osgi.framework.system.packages you are overriding the
>>> default value used by the framework, and hence must include the
>>> packaged
>>> that are expected to be supplied by the framework.
>>>
>>> See
>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>
>>>
>>>
>>> --Andy
>>>
>>>
>>>
>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos
>>> <ba...@everit.biz>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>
>>>> Are you sure that the set of system packages should include the
>>>> OSGi core
>>>> packages?
>>>>
>>>> In my understanding:
>>>>
>>>> - system packages are the ones coming from outside of the OSGi
>>>> container
>>>> - osgi core packages are offered by the framework bundle, but
>>>> they are
>>>> not system packages
>>>>
>>>> In practice:
>>>>
>>>> - If I specify org.osgi.system.packages property for equinox, I
>>>> do not
>>>> have to define the packages implemented by the framework
>>>> - If I specify the same property for felix, I must copy-paste the
>>>> packages of osgi.core always
>>>>
>>>> Do you think there is a use-case when osgi.core packages offered by
>>>> the
>>>> framework should be excluded from the exported packages of the system
>>>> bundle? I think Equinox has the right behavior here.
>>>>
>>>> Do you see any chance to change this behavior in the future?
>>>>
>>>> Kind regards,
>>>> *Balázs **Zsoldos*
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Balázs Zsoldos <ba...@everit.biz>.
This could help a lot, too. For me it smells more like a workaround, but I
see the advantage of being backward compatible.
*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 Tue, Oct 27, 2015 at 3:38 PM, Richard S. Hall <he...@ungoverned.org>
wrote:
> I think it is reasonable to allow someone to hide exports from the system
> bundle, but that doesn't mean that this process couldn't be improved. For
> example, we could introduce a new variable ${framework-exports} as an alias
> to what the framework exports, so then in our default properties file the
> system.packages could be written something like this:
>
> org.osgi.framework.system.packages= ${dollar}{framework-exports} \
> ${dollar}{jre-${dollar}{java.specification.version}}
>
> Thus making it easier for people who want to override system.packages by
> using our alias.
>
> Of course, though, if you just want to add stuff to system packages, then
> you should be using system.packages.extra like others have suggested.
>
> -> richard
>
>
> On 10/27/15 10:21 , David Bosschaert wrote:
>
>> Yes, that's precisely what the
>> org.osgi.framework.system.packages.extra was designed for. That way
>> you don't need to remember what the framework puts on
>> org.osgi.framework.system.packages in order to augment it.
>>
>> Best regards,
>>
>> David
>>
>> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>>
>>> If you are trying to extend the set of packages exported by the system
>>> bundle, you should use org.osgi.framework.system.packages.extra. By
>>> specifying org.osgi.framework.system.packages you are overriding the
>>> default value used by the framework, and hence must include the packaged
>>> that are expected to be supplied by the framework.
>>>
>>> See
>>>
>>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>>
>>>
>>> --Andy
>>>
>>>
>>>
>>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <
>>> balazs.zsoldos@everit.biz>
>>> wrote:
>>>
>>> Hi,
>>>>
>>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>>
>>>> Are you sure that the set of system packages should include the OSGi
>>>> core
>>>> packages?
>>>>
>>>> In my understanding:
>>>>
>>>> - system packages are the ones coming from outside of the OSGi
>>>> container
>>>> - osgi core packages are offered by the framework bundle, but they
>>>> are
>>>> not system packages
>>>>
>>>> In practice:
>>>>
>>>> - If I specify org.osgi.system.packages property for equinox, I do
>>>> not
>>>> have to define the packages implemented by the framework
>>>> - If I specify the same property for felix, I must copy-paste the
>>>> packages of osgi.core always
>>>>
>>>> Do you think there is a use-case when osgi.core packages offered by the
>>>> framework should be excluded from the exported packages of the system
>>>> bundle? I think Equinox has the right behavior here.
>>>>
>>>> Do you see any chance to change this behavior in the future?
>>>>
>>>> Kind regards,
>>>> *Balázs **Zsoldos*
>>>>
>>>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by "Richard S. Hall" <he...@ungoverned.org>.
I think it is reasonable to allow someone to hide exports from the
system bundle, but that doesn't mean that this process couldn't be
improved. For example, we could introduce a new variable
${framework-exports} as an alias to what the framework exports, so then
in our default properties file the system.packages could be written
something like this:
org.osgi.framework.system.packages= ${dollar}{framework-exports} \
${dollar}{jre-${dollar}{java.specification.version}}
Thus making it easier for people who want to override system.packages by
using our alias.
Of course, though, if you just want to add stuff to system packages,
then you should be using system.packages.extra like others have suggested.
-> richard
On 10/27/15 10:21 , David Bosschaert wrote:
> Yes, that's precisely what the
> org.osgi.framework.system.packages.extra was designed for. That way
> you don't need to remember what the framework puts on
> org.osgi.framework.system.packages in order to augment it.
>
> Best regards,
>
> David
>
> On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
>> If you are trying to extend the set of packages exported by the system
>> bundle, you should use org.osgi.framework.system.packages.extra. By
>> specifying org.osgi.framework.system.packages you are overriding the
>> default value used by the framework, and hence must include the packaged
>> that are expected to be supplied by the framework.
>>
>> See
>> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>>
>>
>> --Andy
>>
>>
>>
>> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <ba...@everit.biz>
>> wrote:
>>
>>> Hi,
>>>
>>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>>
>>> Are you sure that the set of system packages should include the OSGi core
>>> packages?
>>>
>>> In my understanding:
>>>
>>> - system packages are the ones coming from outside of the OSGi container
>>> - osgi core packages are offered by the framework bundle, but they are
>>> not system packages
>>>
>>> In practice:
>>>
>>> - If I specify org.osgi.system.packages property for equinox, I do not
>>> have to define the packages implemented by the framework
>>> - If I specify the same property for felix, I must copy-paste the
>>> packages of osgi.core always
>>>
>>> Do you think there is a use-case when osgi.core packages offered by the
>>> framework should be excluded from the exported packages of the system
>>> bundle? I think Equinox has the right behavior here.
>>>
>>> Do you see any chance to change this behavior in the future?
>>>
>>> Kind regards,
>>> *Balázs **Zsoldos*
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by David Bosschaert <da...@gmail.com>.
Yes, that's precisely what the
org.osgi.framework.system.packages.extra was designed for. That way
you don't need to remember what the framework puts on
org.osgi.framework.system.packages in order to augment it.
Best regards,
David
On 27 October 2015 at 14:18, Andy Lee <th...@gmail.com> wrote:
> If you are trying to extend the set of packages exported by the system
> bundle, you should use org.osgi.framework.system.packages.extra. By
> specifying org.osgi.framework.system.packages you are overriding the
> default value used by the framework, and hence must include the packaged
> that are expected to be supplied by the framework.
>
> See
> https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
>
>
> --Andy
>
>
>
> On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <ba...@everit.biz>
> wrote:
>
>> Hi,
>>
>> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>>
>> Are you sure that the set of system packages should include the OSGi core
>> packages?
>>
>> In my understanding:
>>
>> - system packages are the ones coming from outside of the OSGi container
>> - osgi core packages are offered by the framework bundle, but they are
>> not system packages
>>
>> In practice:
>>
>> - If I specify org.osgi.system.packages property for equinox, I do not
>> have to define the packages implemented by the framework
>> - If I specify the same property for felix, I must copy-paste the
>> packages of osgi.core always
>>
>> Do you think there is a use-case when osgi.core packages offered by the
>> framework should be excluded from the exported packages of the system
>> bundle? I think Equinox has the right behavior here.
>>
>> Do you see any chance to change this behavior in the future?
>>
>> Kind regards,
>> *Balázs **Zsoldos*
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: System packages should not contain osgi.core packages (packages
that are exported by the framework)
Posted by Andy Lee <th...@gmail.com>.
If you are trying to extend the set of packages exported by the system
bundle, you should use org.osgi.framework.system.packages.extra. By
specifying org.osgi.framework.system.packages you are overriding the
default value used by the framework, and hence must include the packaged
that are expected to be supplied by the framework.
See
https://osgi.org/javadoc/r5/core/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES
--Andy
On Tue, Oct 27, 2015 at 10:00 AM, Balázs Zsoldos <ba...@everit.biz>
wrote:
> Hi,
>
> I asked this 1-2 years ago, but I think it is worthy to ask it again.
>
> Are you sure that the set of system packages should include the OSGi core
> packages?
>
> In my understanding:
>
> - system packages are the ones coming from outside of the OSGi container
> - osgi core packages are offered by the framework bundle, but they are
> not system packages
>
> In practice:
>
> - If I specify org.osgi.system.packages property for equinox, I do not
> have to define the packages implemented by the framework
> - If I specify the same property for felix, I must copy-paste the
> packages of osgi.core always
>
> Do you think there is a use-case when osgi.core packages offered by the
> framework should be excluded from the exported packages of the system
> bundle? I think Equinox has the right behavior here.
>
> Do you see any chance to change this behavior in the future?
>
> Kind regards,
> *Balázs **Zsoldos*
>