users@jax-rs-spec.java.net

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

From: Sastry Malladi <m_sastry_at_yahoo.com>
Date: Thu, 15 Dec 2011 17:22:48 -0800 (PST)

A similar mechanism is what I just proposed in my other reply.



________________________________
 From: Bill Burke <bburke_at_redhat.com>
To: jsr339-experts_at_jax-rs-spec.java.net
Sent: Monday, December 12, 2011 5:53 AM
Subject: [jsr339-experts] Re: A couple of other questions
 


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