[
https://issues.apache.org/jira/browse/STANBOL-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129948#comment-13129948
]
Reto Bachmann-Gmür commented on STANBOL-352:
--------------------------------------------
Rupert, it could know of the request header by having them injected as field
with @Context (which would be a proxyto the values pertinent to the current
request). But what I actually meant if having multiple MBW for the various
content types. E.g. the resource method returns an instance of Person and we
have two classes extending MessageBodyWriter<Person> one producing PDF and the
other producing HTML.
> make stanbol web services (root resource classes) more portable
> ---------------------------------------------------------------
>
> Key: STANBOL-352
> URL: https://issues.apache.org/jira/browse/STANBOL-352
> Project: Stanbol
> Issue Type: Improvement
> Reporter: Reto Bachmann-Gmür
>
> Despite using the jax-rs (jsr 311) standard stanbol web components aren't
> very portable. The components depend on jersey mostly for producing html
> representation (using freemarker) furthermore they user the ServletContext to
> access osgi services (while this should work with other servlet based jax-rs
> implementation the standard osgi/osgi-ds mechanism should be used). There are
> also some apparent jersey dependencies that in fact aren't, for instance
> org.apache.stanbol.entityhub.jersey.utils.JerseyUtils doesn't depend on
> jersey.
> To improve portability I suggest to:
> - let all root resources be osgi-ds components and have their dependencies
> injected
> And either:
> - extract Viewable and the respective MessageBodyWriter from Jersey to a
> separate bundle so that they can be used on any compliant jax-rs
> implementation
> - separate rest interfaces that do not need rendering from the ui produced
> using freemarker. This would allow to at least run the REST-endpoint for
> machines on other platform.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira