users@jsr311.java.net

Re: JAXRS handlers

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 28 Mar 2008 11:03:51 -0400

-1.

I don't think we should be creating a new component model. Integration
with Web Beans, EJB, and/or Spring would be good enough.

Sergey Beryozkin wrote:
> Hi
>
> Is there any chance for JAX-RS to introduce a notion of handlers, such
> that they can be invoked before/after the
> actual resource class has been invoked upon ? There's a number of
> container-specific ways to handle it, for ex, servlet filters can be
> used in a Servlet-aware container, but it would be handy to have a
> notion of handlers in JAX-RS as well.
>
> For ex.
>
> interface ResourceHandler {
>
> Response handle(UriInfo uriInfo, Class resourceClass);
> }
>
> For inbound handlers, if Response is null the the invocation continues
> otherwise this Response is what needs to be returned
> Similar (if not the same) interface can be created for out-bound handlers.
>
> Such handlers can be used to extend the base JAX-RS implementation, as
> far as handling of various queries is concerned.
> For ex.
> GET /foo?$coolFeatureQuery
>
> will result in either a per or post handler handling the
> request/response somehow.
>
> Does it make sense ?
>
> Thanks, Sergey
>
>
>
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

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