Sorry to have to inject (so to speak) another option so late to this
discussion, but holidays you know.
ECF has a remote services provider that uses either Jaxrs...Jersey or
CXF...for exposing OSGi R7 remote services. It's all deployed via
Karaf features in 4.1.x. Please see [1].
Scott
[1] https://wiki.eclipse.org/Tutorial:_JaxRS_Remote_Services_on_Karaf
On 11/22/2018 7:43 AM, t...@quarendon.net wrote:
For largely historical reasons we have ended up with a setup where we use the
standard karaf HTTP whiteboard service, and then run jersey on top of that with
our own homebrew whiteboard service to register JAXRS endpoints.
I'm looking to replace this with a better solution, presumably based around the
OSGi JAXRS whiteboard spec. and aries-jax-rs-whiteboard
(https://github.com/apache/aries-jax-rs-whiteboard) since that now exists,
which it didn't when we started out.
Is aries-jax-rs-whiteboard compatible with karaf does any one know? Or does it
depend on things that aren't provided, or rely on other things from later OSGi
specs that it doesn't support? I'm finding I'm having to add in a bunch of
bundles, and I'm wondering whether ultimately it's a dead end?
Am I better off doing it another way? Karaf comes with CXF doesn't it? My
preference is to use the official OSGi whiteboard, but if that's going to be
too hard right now I'm not against doing it a CXF specific way. The only
example I can find so far though looks something like this:
@Component(service=TaskServiceRest.class,
property={"service.exported.interfaces=*",
"service.exported.configs=org.apache.cxf.rs",
"org.apache.cxf.rs.address=/tasklistRest"})
Which seems, well, more complex that necessary in comparison to
@Component(service=TaskServiceRest.class)
@JaxrsResource
What's the "best" route right now? It has to be declarative services based, and
whiteboard pattern.
Thanks.