[
https://issues.apache.org/jira/browse/TOMEE-1981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15731324#comment-15731324
]
Robert Panzer commented on TOMEE-1981:
--------------------------------------
Hi Romain,
no problem.
I just thought it would be just logical that if I could disable all other
builtin Providers why I cannot disable these two as well.
Even if I wrote my own MessageBodyWriter (no Jackson or whatever) I have to
know exactly what media types the TomeeJohnzonProvider produces and consumes to
be able to get my own implementation into this chain with a higher priority.
I somewhat disagree with the statement that the TomeeJonhzonProvider has the
lowest priority.
The spec is very superficial regarding the sorting of the, but by binding the
TomeeJonhzonProvider to {{application/json}} it is already pretty specific.
It seems like I can only get in another MessageBodyReader/Writer by not using
any wildcard media types.
> Allow to disable TomEEJohnzonProvider
> -------------------------------------
>
> Key: TOMEE-1981
> URL: https://issues.apache.org/jira/browse/TOMEE-1981
> Project: TomEE
> Issue Type: Improvement
> Components: TomEE Core Server
> Affects Versions: 7.0.2
> Reporter: Robert Panzer
>
> TomEE configures a couple of internal JAX-RS providers, for example:
> - WadlDocumentMessageBodyWriter
> - EJBExceptionMapper
> - ValidationExceptionMapper
> While it is easy to deactivate all these providers by setting the property
> {{org.apache.johnzon.jaxrs.WadlDocumentMessageBodyWriter.activated=false}}
> this is not possible for the TomeeJohnzonProvider and the TomeeJsonpProvider.
> For these 2 providers it should also be possible to deactivate them, in
> particular as it is difficult to get them out of the way when you are using
> other MessageBodyWriters for Json that should bind to the media type {{*/*}}.
> I already created a PR for that at https://github.com/apache/tomee/pull/53,
> maybe it is acceptable.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)