users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Re: Fwd: [Resteasy-users] PostProcessInterceptors not invoked for responses created by ExceptionMappers

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Wed, 22 Aug 2012 15:22:01 -0400

On Aug 22, 2012, at 11:59 AM, Bill Burke wrote:

> Maybe this might simplify things?
>
> If exception thrown from resource method
> - ExceptioMapper
> - response filters and interception if there is an entity.
>
> If an exception thrown in response filter (or WriterInterceptor)
> - ExceptionMapper
> - no additional filtering or interception.

 How about this variation? Exception in:

 (1) Pre-match request filter or Response filter or Writer Interceptor
         -> Exception Mapper -> Response
 
 (2) Post-match request filter or Resource method or Reader interceptor
         -> Exception Mapper -> Response chain -> Response

 Notes:

 - If abortWith(Response) called in pre-match then (1)

 - If abortWith(Response) called in post-match then (2)

 - Writer interceptors executed after Exception Mapper

 - At most one Exception Mapper can be used per request/response (no loops)

 - No such thing as pre-match response filter

-- Santiago