Hi KL
On 23/11/11 16:02, K Fung wrote:
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.


Indeed, I was still thinking about DOSGi where the dsw handler has a dynamic import.

I'm wondering, is it possible for CXF bundle to Dynamic-Import everything but those packages which it imports via Import-Package.
That should be safe enough or not ?

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.

Can be worth experimenting in some time too

Thanks, Sergey

-kl



--
Sergey Beryozkin

http://sberyozkin.blogspot.com

Talend Community Coders
http://coders.talend.com/

Reply via email to