dev@glassfish.java.net

Re: broken Felix classloader?

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Fri, 24 Apr 2009 06:50:43 -0700

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
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team