Thanks for both your answers!

No, David, I don't know of any Geronimo bundle that exports those packages.
I was just wondering whether there exist a bundle that exports them in order
to avoid exposing them directly from the JRE. But I guess the real problem
is that MQ actually uses those packages.

I'll go the jre.properties way.

BTW, this is not the only problem I've found with Webspere MQ's OSGi
support. Here are a couple of others:

- IBM says they use the OSGi R4 spec but that's not indicated in the
manifests of their bundles. I had to manually edit their manifests and add
"Bundle-ManifestVersion: 2" to them. Otherwise Felix would not load the
bundle.
- One of the bundles require the javax.security.cert package but it's not
imported so again I had to manually edit their manifest and add the import.
- They provide one "jms prereq" bundle that conflict with the Geronimo
bundle I use. This was easily solved by not using the MQ bundle.
- They provide another "wmq prereq" bundle that conflicts with the JTA
bundle I use from Geronimo. When I skipped this bundle I instead missed the
com.sun.jndi.* packages I wrote about here.

Seems IBM still has some work to do in order to support OSGi properly...

Maybe I can pop another question regarding import conflicts in OSGi
(Karaf/Felix). If there is any kind of ambiguity (same package exported from
more than one bundle) then the importing bundle is never resolved and I get
the "BLAME" error message. I sometimes feel it would be beneficial if I
could then say "but I want to use the x.y.z package from bundle A - not
bundle B". Is this possible? That would have solved my problems above. I
could perhaps install the "wmq prereq" bundle but say to Karaf/Felix that I
do not want it to export the conflicting packages.

/Bengt


2011/3/12 David Jencks <[email protected]>

> I confused by your message.  Are you saying these com.sun.jndi* packages
> are exported by a geronimo bundle?  If so, which one?  That would be a
> mistake we'd like to  fix.
> I didn't see these exports in the geronimo-jta_1.1_spec bundles I looked
> in.
>
> And, I agree with Andreas that adding these to jre.properties is the
> correct approach (other than convincing mq not to use them :-)
>
> thanks
> david jencks
> On Mar 12, 2011, at 2:35 PM, Bengt Rodehav wrote:
>
> > I'm not sure if this is the right forum for this question but I'll give
> it a try.
> >
> > I'm trying to use Websphere MQ (client jar's) from within Karaf 2.1.3.
> I've had great troubles with this since there are several problems with the
> OSGi bundles that are included in MQ (version 7.0.1.4). By manually editing
> the manifest of the bundles I've finally gotten it to work. However, one of
> the bundles conflict with my Geronimo jta bundle which caused me not wanting
> to use that bundle. However, that bundle also exports the following packages
> (which MQ needs):
> >
> >  com.sun.jndi.fscontext
> >  com.sun.jndi.ldap
> >  com.sun.jndi.toolkit.chars
> >  com.sun.jndi.toolkit.corba
> >  com.sun.jndi.toolkit.ctx
> >  com.sun.jndi.toolkit.dir
> >  com.sun.jndi.toolkit.url
> >  com.sun.jndi.url.file
> >  com.sun.jndi.url.jndi
> >  com.sun.jndi.url.ldap
> >
> > If I add these properties to jre.properties then it works. However, I
> believe this is bad practice. It is usually better to deploy a bundle that
> exports the packages. Most of the JEE specs are provided as bundles by
> Geronimo but I haven't found a bundle including the above packages. Does
> anyone know where I can find that? Or is adding them to jre.properties OK?
> >
> > /Bengt
>
>

Reply via email to