[
https://issues.apache.org/jira/browse/SLING-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14735582#comment-14735582
]
Alexander Klimetschek commented on SLING-2192:
----------------------------------------------
Generally speaking: Sling has its own concept of approaching REST, by means of
addressing Resources first and the ResourceResolver framework for that. JAX-RS
is inherently incompatible with that - you can make it live side by side next
to Sling, via registration on the OSGI HTTP Service, but that's it.
The above questions are really about "make JAX-RS compatible with OSGI" (which
it is currently not, since its registration model is wire once, it does not
take services coming and going into account, and as Clint mentions, bundle
modularization is difficult). I don't think Sling itself should worry about
this. If users run JAX-RS stuff next to Sling on the same JVM/OSGI container
(and all the questions are solved), fine, but that is outside the scope of the
Sling framework.
It's good that the OSGi Alliance itself is looking into that. Just one note:
the [RFP-173
draft|https://github.com/osgi/design/blob/master/rfps/rfp-0173-JAX-RS-Services.pdf]
talks about "RESTful" in the first sentence. However, the person who defined
the term REST, [says that JAX-RS is anything but
REST|https://java.net/projects/jsr311/lists/dev/archive/2007-04/message/143],
so I think it would be nice for the OSGi alliance to use that term in their
integration work of JAX-RS.
> 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)