Skip to main content

[jsr339-experts] Re: [jax-rs-spec users] response filtering and exceptions

  • From: Marek Potociar <marek.potociar@...>
  • To: jsr339-experts@...
  • Subject: [jsr339-experts] Re: [jax-rs-spec users] response filtering and exceptions
  • Date: Mon, 23 Jul 2012 18:11:12 +0200

Hi Bill,
Let me have a look. Have you file a Jira issue yet? :) If yes, what's the 
number?

Marek
 
On Jul 11, 2012, at 4:28 PM, Bill Burke wrote:

> Hi all,
> 
> I think we need something in ContainerResponseFilter to distinguish that an 
> exception was thrown from application code (and maybe internally as well).  
> Came across a user case recently that wanted to know that a failure occured 
> and what exact exception.
> 
> I suggest at minimum, 2 methods on ContainerResponseContext (better names 
> maybe?).  Probably similar methods on WriterInterceptor.
> 
> 
> boolean wasFailure();
> Throwable getFailure();
> 
> Don't know, but maybe also a new method on ContainerResponseFilter
> 
> void failure(ContainerRequestContext requestContext, 
> ContainerResponseContext responseContext)
>            throws IOException;
> 
> 
> failure should be called after any ExceptionMapper, but before anything 
> else.
> 
> The main reason for this is name-bound filters and interceptors might want 
> to make a different decision based on a user failure.
> 
> 
> 
> 
> 
> -- 
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> 



[jsr339-experts] response filtering and exceptions

Bill Burke 07/11/2012

[jsr339-experts] Re: [jax-rs-spec users] response filtering and exceptions

Marek Potociar 07/23/2012

[jsr339-experts] Re: [jax-rs-spec users] response filtering and exceptions

Bill Burke 07/23/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: response filtering and exceptions

Marek Potociar 07/23/2012

[jsr339-experts] Re: [jax-rs-spec users] response filtering and exceptions

Bill Burke 07/24/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: response filtering and exceptions

Marek Potociar 07/24/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: response filtering and exceptions

Bill Burke 07/24/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: response filtering and exceptions

Marek Potociar 07/27/2012
 
 
Close
loading
Please Confirm
Close