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

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: FilterAction and FilterContext

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 02 Dec 2011 16:44:06 +0100

On 12/02/2011 03:39 PM, Bill Burke wrote:
>
>
> On 12/2/11 5:42 AM, Marek Potociar wrote:
>
>> With one call stack you loose control over the threading model which makes any truly high-performance non-blocking or
>> concurrent processing support close to impossible.
>>
>
> You are misunderstanding me:
>
> 1 callstack for RequestFilter
> 1 callstack for ResponseFilter
> 1 callstack for MBW
> 1 callstack for MBR
>
> Its all consistent across the board. Its what we do in Resteasy and we support async invocations.
>

I see what you mean now. Still, with your current setup, how would you support non-blocking (how would you unwind and
rewind the call stack if the processing is suspended) or concurrent filter processing (e.g. non-modifying filters do not
need to block the rest of the filter chain and can be executed concurrently once they are reached)?

Btw. esp. when considering non-blocking scenarios I am starting to think that our current wrapping concept for handlers
may perhaps not be a good idea either. But I need to give it more thought...

Marek