jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Are interceptors invoked only if MBW or MBR is available ?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 8 May 2013 11:18:03 +0100

On 08/05/13 10:45, Sergey Beryozkin wrote:
> Hi All,
>
> Are writer and reader interceptors invoked regardless if whether MBW or
> MBR is available for a given type ?
>
> For example, given a method like
>
> @POST
> public void postBook(Book book) {}
>
> are registered ReaderInterceptors run only if Book MessageBodyReader is
> available or they run no matter what, and then, after the last
> registered reader is finished, the MBR selection begins ?
>
> I'm still under the impression that the interceptors are run only if MBW
> or MBR has been already selected, still checking the archives. The spec
> is not exactly clear on that.

Found this response from Marek:
https://java.net/projects/jax-rs-spec/lists/jsr339-experts/archive/2012-09/message/137

So I guess that still stands, in the above example we will only invoke
registered interceptors if MBW or MBR is available

Sergey

>
> Can someone clarify please ?
>
> Thanks, Sergey