users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Client initialization on server-side

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Fri, 3 Feb 2012 10:00:09 -0500

On Feb 1, 2012, at 10:36 AM, Bill Burke wrote:

> The binding of providers on the server side for JAX-RS resources is pretty staightforward.
>
> It is not so straightforward for Clients though. Should we allow the injection of Client instances? i.e.
>
> @Resource Client client;
>
> In this case, how would the Client be initialized? With what providers? This is important as there will be client-specific filters/interceptors and server-specific filters/interceptors. This also has an effect on default providers created by the container and how those default providers are registered.

 Could you comment on [1] to keep track of this?

-- Santiago

[1] http://java.net/jira/browse/JAX_RS_SPEC-170

>
> Some ideas:
>
> * have a @Client/_at_Server annotation that could be applied to a provider to scope it for either Client and/or Server.
>
> * Add getClientClasses() and getClientSingletons() to Application
>
> * Make the Configuration interface simpler so users can implement it and register it just like they do with the Application class. You might even be able to define binding annotations and have multiple Configurations per application that could be injected.
>
> Bill
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com