cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From K Fung <kfung4...@gmail.com>
Subject Re: How to contribue a CXF JAX-RS OSGi Sample?
Date Wed, 23 Nov 2011 16:02:38 GMT
Hi Sergey,

> I'm wondering if 'minimalosgi' has to be exported ?

I tried this before and it didn't work.

minimalosgi has one classloader; the CXF bundle has its own
classloader. minimalosgi's
classloader has knowledge about CXF (due to the Import-Package declarations
in its MANIFEST.MF) but CXF doesn't have knowledge of minimalosgi because
it doesn't import it. Because CXF uses its own bundle classloader to
resolve minimalosgi, it won't be able to find minimalosgi.

If the JAX-RS Application class had a way to supply the Application via a
Class<?> parameter it wouldn't be a problem because we could pass the
Application object directly and not rely on creation via reflection inside
CXF. Furthermore, if we had used the CXF-specific JAX-RS factory bean, I
believe this servlet workaround wouldn't have been necessary.

While experimenting with this issue, it may be possible to get around this
by making the minimalosgi bundle a fragment bundle of the CXF bundle but I
haven't clearly thought about the consequences of doing so yet.

-kl

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message