[
https://issues.apache.org/jira/browse/SLING-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14735620#comment-14735620
]
Stefan Seifert commented on SLING-2192:
---------------------------------------
if your are looking for a "make JAX-RS compatible with OSGI" solution which can
run nicely in a sling launchpad and OSGi but beside this is not integrated
further with Sling have a look at this:
http://caravan.wcm.io/jaxrs/publisher/
it supports registering OSGi services as JAX-RS components with all OSGi
features like dependency injection and services coming and going, and ensures
that for every bundle an own JAX-RS application is instantiated so different
bundles containing JAX-RS services in the same container do not conflict with
each other. it's based on [jersey|https://jersey.java.net/].
in the [github repo|https://github.com/wcm-io-caravan/caravan-jaxrs] you'll
find an integration test example as well.
there are alternative JAX-RS OSGi integrations listed on the mentioned page as
well, esp. the [OSGi JAX-RS
Connector|https://github.com/hstaudacher/osgi-jax-rs-connector] is
well-maintained, but it has some problems like merging all services from all
bundles into one single JAX-RS application.
> Support JAX-RS resource classes
> -------------------------------
>
> Key: SLING-2192
> URL: https://issues.apache.org/jira/browse/SLING-2192
> Project: Sling
> Issue Type: New Feature
> Reporter: Reto Gmür
> Attachments: SLING-2192-20110310.patch, SLING-2192-20111004.patch,
> SLING-2192-20111013.patch, SLING-2192-new-jax-rs-bundle.patch,
> SLING-2192-new-jax-rs-bundle.patch,
> SLING-2192-with-sling-style-style-registration.patch,
> SLING-2192-with-tests.patch, jaxrs-in-contrib.patch, slingr-on-wink-osgi.patch
>
>
> It should be possible to register jax resource classes and providers as
> services. As they don't implement a specific interface services that expose
> java.lang.Object should be considered as javx-rs services iff they have the
> service property "javax.ws.rs" set to true.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)