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: Bill Burke <bburke_at_redhat.com>
Date: Wed, 22 Aug 2012 18:00:31 -0400

On 8/22/2012 3:22 PM, Santiago Pericas-Geertsen wrote:
>
> 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
>

Looks good. I still think it would be useful to have info in the
context objects on whether or not you're filtering a failure. Filters
will be able to make good decisions based on the response code, but, I'm
worried that that isn't enough. Not sure though :)


-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com