ECF / JaxRSProviders

Remote Services distribution provider based upon JaxRS. Includes imples based upon Jersey and CXF.
Apache License 2.0
13 stars 19 forks source link

Make it possible to use the HTTP WhiteBoard #7

Closed steinarb closed 4 years ago

steinarb commented 6 years ago

Make it possible to have the servlet container for the REST services exposed by JaxRSProviders register itself using the HTTP WhiteBoard.

scottslewis commented 6 years ago

Thanks for the issue. I can't work on this right away due to other commitments, but I will try to get to it asap.

BTW, I understand your comment on karaf-users about using 'plain 'ol HttpService seeming a 'step backward'...as HttpService.registerServlet is the 'old way' and the http-whiteboard the 'new' way (and generally easier), but since this is done by the jersey and cxf distribution provider code (in this repo) it doesn't particularly matter to the developer (you) which way it's done...i.e. it's done automatically by registering the resource as an OSGi service. That's why I suggested using both...i.e. you could run this distribution provider alongside your other code and as long as the servlet aliases don't conflict it should be fine to use http-whiteboard and the HttpService directly (implicitly).

But I get that http-whiteboard is nicer, newer, etc.

One reason for keeping the distribution provider able to do things things with HttpService.registerServlet is that it doesn't require the latest of everything (which I believe http-whiteboard does). That's one reason why the distribution provider uses HttpService.registerService for now as that's been around forever :).

scottslewis commented 4 years ago

Going to close this issue, as technically speaking it is possible to extend the existing distribution providers and have them use the HttpWhiteboard right now, and for reasons expressed in previous comments I think it's better to have the default continue to be using HttpService.registerServlet.