users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: More allowable component types for DynamicFeature?

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Wed, 20 Feb 2013 18:15:01 +0100

A MBW get's the information about method annotations. Why cannot it deal with selecting proper context resolver?

Marek

On Feb 20, 2013, at 4:09 PM, Bill Burke <bburke_at_redhat.com> wrote:

> I don't know how to make it any clearer than the example below. ContextResolver is usually used to configure a specific JAXBContext or Jackson ObjectMapper. There are many cases (see below) where a specific resource has specific formatting requirements that can only be done at the JAXBContext or ObjectMapper level.
>
> On 2/20/2013 8:48 AM, Marek Potociar wrote:
>> The ContextResolver is a global concept, not bound to a method. Unless I'm missing something.
>>
>> Marek
>>
>> On Feb 19, 2013, at 6:54 PM, Bill Burke <bburke_at_redhat.com> wrote:
>>
>>> DynamicFeature only allows you to register filter and interceptors. I can see somebody also wanting to register a ContextResolver per method, or even a specific MBR/MBW.
>>>
>>> For example:
>>>
>>> @PrettyPrint
>>> @GET
>>> @Produces("application/xml")
>>> public MyJaxb get() {...}
>>>
>>> @PrettyPrint would trigger an addition of a JAXBContext conext resolver that set the appropriate settings for that context.
>>> --
>>> Bill Burke
>>> JBoss, a division of Red Hat
>>> http://bill.burkecentral.com
>>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com