dev@glassfish.java.net

Re: broken Felix classloader?

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Fri, 24 Apr 2009 08:47:01 -0700

Thank you Richard, I'll test this out and verify.

On Apr 24, 2009, at 7:59 AM, heavy_at_ungoverned.org wrote:

> I guess I should be a little more precise in my response.
>
> OSGi requires that you declare every pacakge you need explicitly.
> However,
> in this case the osgi.bundle file is for BND (I believe) and
> typically BND
> will automatically generate imports for every package your need, so
> you
> don't need to do this manually. But in this case, since there is no
> code,
> BND cannot generate the imports automatically, so you need to list
> them
> explicitly.
>
> -> richard
>
> On Fri, 24 Apr 2009 10:11:38 -0400, "Richard S. Hall"
> <heavy_at_ungoverned.org>
> wrote:
>> No, you need to specify all that you need.
>>
>> -> richard
>>
>> On 4/24/09 9:50 AM, Lloyd Chambers wrote:
>>> Sahoo,
>>>
>>> I'll try this.
>>>
>>> Does this import cover all sub-packages of javax.management, like
>>> javax.management.remote?
>>>
>>> Lloyd
>>>
>>> On Apr 24, 2009, at 1:10 AM, Sahoo wrote:
>>>
>>>> Lloyd Chambers wrote:
>>>>> Richard,
>>>>>
>>>>> I found that I was mistaken about module amx-config. It had no
>>>>> reference to javax.management, so it had no Import-Package
>>>>> directive
>>>>> for it.
>>>>>
>>>>> That OSGi prevents access to standard JDK classes defies common
>>>>> sense IMO, but that's the last I'll gripe about it.
>>>>>
>>>>> ...
>>>>>
>>>>> The simplest solution I found was to add a dummy interface in the
>>>>> module:
>>>>>
>>>>> public interface ForceThisModuleToHaveAccesstoTheseTypes
>>>>> {
>>>>> public javax.management.ObjectName
>>>>> forceInclusionOf_javax_management();
>>>>> }
>>>>>
>>>>> Adding this class causes Import-Package to include
>>>>> javax.management.
>>>>>
>>>> If you want some Import-Package to appear in the bundle's manifest
>>>> header, instead of doing what you have said above, add the
>>>> appropriate package in osgi.bundle file which resides next to
>>>> pom.xml
>>>> of the bundle. You can do something like this:
>>>> Import-Package: javax.management, *
>>>>
>>>> Thanks,
>>>> Sahoo
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> <mailto:dev-unsubscribe_at_glassfish.dev.java.net>
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>> <mailto:dev-help_at_glassfish.dev.java.net>
>>>>
>>>
>>> Lloyd Chambers
>>> lloyd.chambers_at_sun.com <mailto:lloyd.chambers_at_sun.com>
>>> GlassFish Team
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team