users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: A couple of other questions

From: Bill Burke <bburke_at_redhat.com>
Date: Mon, 12 Dec 2011 08:53:50 -0500

On 12/10/11 3:14 PM, Marek Potociar wrote:
>
>
> On 12/10/2011 02:21 AM, Sastry Malladi wrote:
>>
>> Client API
>> Configuration of handlers/filters is done through configuration().register() - The order of execution depends on
>> @BindingPriority. How does a specific environment register certain client side filters by default, instead of each
>> client application registering their own ? I guess I'm looking for @GlobalBinding equivalent on the client side.
>> Provide custom Client and Target classes, which registers these filters by default and have the client use these custom
>> classes ? A simpler way to "install" default filters would be good.
>
> Do you have any concrete proposal in mind?
>

You might as well ask, how does one register default
MessageBodyReader/Writers? Resteasy does it by allowing a jar to have a

META-INF/services/javax.ws.rs.ext.Providers

file within it. That file lists a set of classnames that are registered
as providers. It works out pretty well as the only thing the user
usually has to do is include the jar within their deployment.

Besides the above, there is no good way to standardize this as a client
could be installed into any type of environment. Same goes for the
server side. The JAX-RS spec can really mandate how an application
server bootstrap's itself.

Bill

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