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

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

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

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.

Can someone clarify please ?

Thanks, Sergey