users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Order of WritingInterceptor

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Thu, 12 Sep 2013 12:04:33 +0100

https://java.net/jira/browse/JAX_RS_SPEC-427

FYI, I'm a bit discouraged by the lack of comments from the spec leads
but may be I should not expect any timely feedback due to the fact no
JAX-RS 2.1 effort has started

Thanks, Sergey

On 10/09/13 16:29, Sergey Beryozkin wrote:
> Hi
>
> I've been searching for some possible explanation of why I see the early
> TCK client tests failing (CXF sorts ClientRequestFilter in ascending
> order as per the spec but a given TCK test assumes that a
> ClientRequestFilter with a lower Priority value is called after the one
> with a higher one) and spotted another issue.
>
> The spec says:
>
> "Execution chains for extension points ContainerRequest,
> PreMatchContainerRequest, ClientRequest, ReadFrom and *WriteTo*
> are sorted in ascending order"
>
> while this Jersey resource says:
> http://jersey.java.net/documentation/latest/filters-and-interceptors.html#d0e6903
>
>
>
> "Providers used during response processing (ContainerResponseFilter,
> ClientResponseFilter, WriterIntercepors) are executed in the reverse
> order (using descending manner)"
>
> So which source is correct ? The spec says that WriterIntercepors (part
> of the WriteTo chain) are sorted in ascending order, the Jersey resource
> says they are sorted in the descending order
>
> Cheers, Sergey