You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Guillaume Sauthier <Gu...@objectweb.org> on 2009/07/22 11:26:26 UTC
Bootdelegation syntax and semantic
Hi all
I have some questions about bootdelegation and dynamic import package
syntax and semantic.
I did not find the spec very clear about the expected behavior of a
package pattern description ( 'com.sun.corba.*' for example).
In previous versions of Felix (1.4.x at least), the package itself
('com.sun.corba') was included "in the pattern", meaning that if a
bundle want to load 'com.sun.corba.Anything', it will be delegated to
the boot classloader. All subpackages matching the pattern will also be
delegated to the boot loader ('com.sun.corba.orb.Other').
In current Felix (1.8.x), the package itself is no more delegated.
This behavior has been observed for both bootdelegation and dynamic
import package.
I was wondering what was the reason behind this change ?
In my use case, I want to delegate the package itself AND the
subpackages. In previous versions of Felix I was describing this using
this pattern:
'com.sun.corba.*'
Now, I have to describe my pattern in the following way:
'com.sun.corba*' Notice that I removed the '.' before the '*'
I could also achieve the same result with this other description:
'com.sun.corba,com.sun.corba.*' but it seems odd (for me) to write my
package name twice ...
Regarding the spec, the description format of a package/pattern should
be the following:
package-name | package-name '.*' | '*'
So it seems that describing a package like 'com.sun.corba*' is wrong.
But it works with Felix.
Must I fill a bug ?
What is the best interoperable way to describe bootdelegation ?
What should I write ?
Does someone know what works with Equinox ?
Thanks
--Guillaume
Re: Bootdelegation syntax and semantic
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 7/22/09 2:26 AM, Guillaume Sauthier wrote:
> Hi all
>
> I have some questions about bootdelegation and dynamic import package
> syntax and semantic.
>
> I did not find the spec very clear about the expected behavior of a
> package pattern description ( 'com.sun.corba.*' for example).
> In previous versions of Felix (1.4.x at least), the package itself
> ('com.sun.corba') was included "in the pattern", meaning that if a
> bundle want to load 'com.sun.corba.Anything', it will be delegated to
> the boot classloader. All subpackages matching the pattern will also
> be delegated to the boot loader ('com.sun.corba.orb.Other').
>
> In current Felix (1.8.x), the package itself is no more delegated.
> This behavior has been observed for both bootdelegation and dynamic
> import package.
>
> I was wondering what was the reason behind this change ?
As Sahoo said, this is apparently the "correct" behavior according to
the spec.
> In my use case, I want to delegate the package itself AND the
> subpackages. In previous versions of Felix I was describing this using
> this pattern:
> 'com.sun.corba.*'
>
> Now, I have to describe my pattern in the following way:
> 'com.sun.corba*' Notice that I removed the '.' before the '*'
That sounds like a bug. Please open an issue.
> I could also achieve the same result with this other description:
> 'com.sun.corba,com.sun.corba.*' but it seems odd (for me) to write my
> package name twice ...
Yes, I agree, it does seem odd, but we are stuck with it now.
> Regarding the spec, the description format of a package/pattern should
> be the following:
> package-name | package-name '.*' | '*'
> So it seems that describing a package like 'com.sun.corba*' is wrong.
> But it works with Felix.
> Must I fill a bug ?
>
> What is the best interoperable way to describe bootdelegation ?
> What should I write ?
> Does someone know what works with Equinox ?
Equinox works like Felix does, minus the bug you mention above, I
imagine. :-)
-> richard
>
> Thanks
> --Guillaume
Re: Bootdelegation syntax and semantic
Posted by Guillaume Sauthier <Gu...@objectweb.org>.
Richard S. Hall a écrit :
> On 7/22/09 8:18 AM, Guillaume Sauthier wrote:
>> Sahoo a écrit :
>>> Guillaume,
>>>
>>> The earlier behavior was incorrect and it was fixed as:
>>>
>>> https://issues.apache.org/jira/browse/FELIX-1034
>>> and
>>> https://issues.apache.org/jira/browse/FELIX-1059
>>
>> I've seen this discussion that seems related:
>> http://www.nabble.com/Interpretation-of-*-in-DynamicImport-Package-td23249684.html
>>
>>
>> Only for curiosity, I searched, with no success, the thread on
>> osgi-dev where there is a consensus around the '.*' semantic.
>> Do you have any pointer for me ?
>
> It is very explicit in R4.2:
>
> The .* wildcard means deep matching, that is, com.acme.*, matches
> any sub-package of package com.acme, however, it does not match
> com.acme.
Thanks for the pointer. I was looking at R4.1 :)
--Guillaume
>
> Thanks for opening the issue, it will be fixed in the next release.
>
> -> richard
>
>>
>>>
>>> You guessed it right, a portable way to achieve bootdelegation for
>>> com.sun.corba and its subpackages is to specify like this:
>>>
>>> com.sun.corba, com.sun.corba.*
>> Ok, I'll do that. I was writing 'com.sun.corba*' by pure lazyness :)
>>>
>>> I think com.sun.corba* is a bug and you should file a bug.
>> Here it is: https://issues.apache.org/jira/browse/FELIX-1400
>>
>> Thanks for the comments
>> --Guillaume
>>>
>>> Thanks,
>>> Sahoo
>>>
>>> Guillaume Sauthier wrote:
>>>> Hi all
>>>>
>>>> I have some questions about bootdelegation and dynamic import
>>>> package syntax and semantic.
>>>>
>>>> I did not find the spec very clear about the expected behavior of a
>>>> package pattern description ( 'com.sun.corba.*' for example).
>>>> In previous versions of Felix (1.4.x at least), the package itself
>>>> ('com.sun.corba') was included "in the pattern", meaning that if a
>>>> bundle want to load 'com.sun.corba.Anything', it will be delegated
>>>> to the boot classloader. All subpackages matching the pattern will
>>>> also be delegated to the boot loader ('com.sun.corba.orb.Other').
>>>>
>>>> In current Felix (1.8.x), the package itself is no more delegated.
>>>> This behavior has been observed for both bootdelegation and dynamic
>>>> import package.
>>>>
>>>> I was wondering what was the reason behind this change ?
>>>>
>>>> In my use case, I want to delegate the package itself AND the
>>>> subpackages. In previous versions of Felix I was describing this
>>>> using this pattern:
>>>> 'com.sun.corba.*'
>>>>
>>>> Now, I have to describe my pattern in the following way:
>>>> 'com.sun.corba*' Notice that I removed the '.' before the '*'
>>>>
>>>> I could also achieve the same result with this other description:
>>>> 'com.sun.corba,com.sun.corba.*' but it seems odd (for me) to write
>>>> my package name twice ...
>>>>
>>>> Regarding the spec, the description format of a package/pattern
>>>> should be the following:
>>>> package-name | package-name '.*' | '*'
>>>> So it seems that describing a package like 'com.sun.corba*' is wrong.
>>>> But it works with Felix.
>>>> Must I fill a bug ?
>>>>
>>>> What is the best interoperable way to describe bootdelegation ?
>>>> What should I write ?
>>>> Does someone know what works with Equinox ?
>>>>
>>>> Thanks
>>>> --Guillaume
>>>
>>>
>>
>
Re: Bootdelegation syntax and semantic
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 7/22/09 8:18 AM, Guillaume Sauthier wrote:
> Sahoo a écrit :
>> Guillaume,
>>
>> The earlier behavior was incorrect and it was fixed as:
>>
>> https://issues.apache.org/jira/browse/FELIX-1034
>> and
>> https://issues.apache.org/jira/browse/FELIX-1059
>
> I've seen this discussion that seems related:
> http://www.nabble.com/Interpretation-of-*-in-DynamicImport-Package-td23249684.html
>
>
> Only for curiosity, I searched, with no success, the thread on
> osgi-dev where there is a consensus around the '.*' semantic.
> Do you have any pointer for me ?
It is very explicit in R4.2:
The .* wildcard means deep matching, that is, com.acme.*, matches
any sub-package of package com.acme, however, it does not match
com.acme.
Thanks for opening the issue, it will be fixed in the next release.
-> richard
>
>>
>> You guessed it right, a portable way to achieve bootdelegation for
>> com.sun.corba and its subpackages is to specify like this:
>>
>> com.sun.corba, com.sun.corba.*
> Ok, I'll do that. I was writing 'com.sun.corba*' by pure lazyness :)
>>
>> I think com.sun.corba* is a bug and you should file a bug.
> Here it is: https://issues.apache.org/jira/browse/FELIX-1400
>
> Thanks for the comments
> --Guillaume
>>
>> Thanks,
>> Sahoo
>>
>> Guillaume Sauthier wrote:
>>> Hi all
>>>
>>> I have some questions about bootdelegation and dynamic import
>>> package syntax and semantic.
>>>
>>> I did not find the spec very clear about the expected behavior of a
>>> package pattern description ( 'com.sun.corba.*' for example).
>>> In previous versions of Felix (1.4.x at least), the package itself
>>> ('com.sun.corba') was included "in the pattern", meaning that if a
>>> bundle want to load 'com.sun.corba.Anything', it will be delegated
>>> to the boot classloader. All subpackages matching the pattern will
>>> also be delegated to the boot loader ('com.sun.corba.orb.Other').
>>>
>>> In current Felix (1.8.x), the package itself is no more delegated.
>>> This behavior has been observed for both bootdelegation and dynamic
>>> import package.
>>>
>>> I was wondering what was the reason behind this change ?
>>>
>>> In my use case, I want to delegate the package itself AND the
>>> subpackages. In previous versions of Felix I was describing this
>>> using this pattern:
>>> 'com.sun.corba.*'
>>>
>>> Now, I have to describe my pattern in the following way:
>>> 'com.sun.corba*' Notice that I removed the '.' before the '*'
>>>
>>> I could also achieve the same result with this other description:
>>> 'com.sun.corba,com.sun.corba.*' but it seems odd (for me) to write
>>> my package name twice ...
>>>
>>> Regarding the spec, the description format of a package/pattern
>>> should be the following:
>>> package-name | package-name '.*' | '*'
>>> So it seems that describing a package like 'com.sun.corba*' is wrong.
>>> But it works with Felix.
>>> Must I fill a bug ?
>>>
>>> What is the best interoperable way to describe bootdelegation ?
>>> What should I write ?
>>> Does someone know what works with Equinox ?
>>>
>>> Thanks
>>> --Guillaume
>>
>>
>
Re: Bootdelegation syntax and semantic
Posted by Guillaume Sauthier <Gu...@objectweb.org>.
Sahoo a écrit :
> Guillaume,
>
> The earlier behavior was incorrect and it was fixed as:
>
> https://issues.apache.org/jira/browse/FELIX-1034
> and
> https://issues.apache.org/jira/browse/FELIX-1059
I've seen this discussion that seems related:
http://www.nabble.com/Interpretation-of-*-in-DynamicImport-Package-td23249684.html
Only for curiosity, I searched, with no success, the thread on osgi-dev
where there is a consensus around the '.*' semantic.
Do you have any pointer for me ?
>
> You guessed it right, a portable way to achieve bootdelegation for
> com.sun.corba and its subpackages is to specify like this:
>
> com.sun.corba, com.sun.corba.*
Ok, I'll do that. I was writing 'com.sun.corba*' by pure lazyness :)
>
> I think com.sun.corba* is a bug and you should file a bug.
Here it is: https://issues.apache.org/jira/browse/FELIX-1400
Thanks for the comments
--Guillaume
>
> Thanks,
> Sahoo
>
> Guillaume Sauthier wrote:
>> Hi all
>>
>> I have some questions about bootdelegation and dynamic import package
>> syntax and semantic.
>>
>> I did not find the spec very clear about the expected behavior of a
>> package pattern description ( 'com.sun.corba.*' for example).
>> In previous versions of Felix (1.4.x at least), the package itself
>> ('com.sun.corba') was included "in the pattern", meaning that if a
>> bundle want to load 'com.sun.corba.Anything', it will be delegated to
>> the boot classloader. All subpackages matching the pattern will also
>> be delegated to the boot loader ('com.sun.corba.orb.Other').
>>
>> In current Felix (1.8.x), the package itself is no more delegated.
>> This behavior has been observed for both bootdelegation and dynamic
>> import package.
>>
>> I was wondering what was the reason behind this change ?
>>
>> In my use case, I want to delegate the package itself AND the
>> subpackages. In previous versions of Felix I was describing this
>> using this pattern:
>> 'com.sun.corba.*'
>>
>> Now, I have to describe my pattern in the following way:
>> 'com.sun.corba*' Notice that I removed the '.' before the '*'
>>
>> I could also achieve the same result with this other description:
>> 'com.sun.corba,com.sun.corba.*' but it seems odd (for me) to write my
>> package name twice ...
>>
>> Regarding the spec, the description format of a package/pattern
>> should be the following:
>> package-name | package-name '.*' | '*'
>> So it seems that describing a package like 'com.sun.corba*' is wrong.
>> But it works with Felix.
>> Must I fill a bug ?
>>
>> What is the best interoperable way to describe bootdelegation ?
>> What should I write ?
>> Does someone know what works with Equinox ?
>>
>> Thanks
>> --Guillaume
>
>
Re: Bootdelegation syntax and semantic
Posted by Sahoo <Sa...@Sun.COM>.
Guillaume,
The earlier behavior was incorrect and it was fixed as:
https://issues.apache.org/jira/browse/FELIX-1034
and
https://issues.apache.org/jira/browse/FELIX-1059
You guessed it right, a portable way to achieve bootdelegation for
com.sun.corba and its subpackages is to specify like this:
com.sun.corba, com.sun.corba.*
I think com.sun.corba* is a bug and you should file a bug.
Thanks,
Sahoo
Guillaume Sauthier wrote:
> Hi all
>
> I have some questions about bootdelegation and dynamic import package
> syntax and semantic.
>
> I did not find the spec very clear about the expected behavior of a
> package pattern description ( 'com.sun.corba.*' for example).
> In previous versions of Felix (1.4.x at least), the package itself
> ('com.sun.corba') was included "in the pattern", meaning that if a
> bundle want to load 'com.sun.corba.Anything', it will be delegated to
> the boot classloader. All subpackages matching the pattern will also
> be delegated to the boot loader ('com.sun.corba.orb.Other').
>
> In current Felix (1.8.x), the package itself is no more delegated.
> This behavior has been observed for both bootdelegation and dynamic
> import package.
>
> I was wondering what was the reason behind this change ?
>
> In my use case, I want to delegate the package itself AND the
> subpackages. In previous versions of Felix I was describing this using
> this pattern:
> 'com.sun.corba.*'
>
> Now, I have to describe my pattern in the following way:
> 'com.sun.corba*' Notice that I removed the '.' before the '*'
>
> I could also achieve the same result with this other description:
> 'com.sun.corba,com.sun.corba.*' but it seems odd (for me) to write my
> package name twice ...
>
> Regarding the spec, the description format of a package/pattern should
> be the following:
> package-name | package-name '.*' | '*'
> So it seems that describing a package like 'com.sun.corba*' is wrong.
> But it works with Felix.
> Must I fill a bug ?
>
> What is the best interoperable way to describe bootdelegation ?
> What should I write ?
> Does someone know what works with Equinox ?
>
> Thanks
> --Guillaume