Hi
On 12/04/16 16:39, Arnaud Mergey wrote:
Hello,

Running in OSGI, CXF automatically register the cxf servlet in available
HttpService.
Since equinox (and felix) implements osgi http whiteboard specification

Servlets are isolated from others (session and context) unless they use
same HttpContext

Looking at the code, it seems not to be possible to configure or to
retrieve same context used by CXF,

org.apache.cxf.transport.http.osgi.ServletExporter.updated(Dictionary)
method create a default HttpContext instance to register cxf servlet in
HttpService.

Would it be feasible to use a specific named context, so other servlets
or filters could be use same to share same http session for example,
another solution, if it is feasible, could be to add a parameter
allowing to define the context name that could be looked up and used
instead of default one.

Would it makes sense to fill an enhancement about that ?

It sounds reasonable, can you please provide a patch ?

FYI, it is possible to register CXF endpoints in OSGI from web.xml (with the old Spring DM or Blueprint context lsiteners). The issue above only applied to a default CXF OSGI HTTP transport which can also be disabled if web.xml is used

Cheers, Sergey

--
Sergey Beryozkin

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

Reply via email to