users@jax-rs-spec.java.net

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

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 10 Sep 2013 16:29:17 +0100

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