jsr339-experts@jax-rs-spec.java.net

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

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Thu, 16 Feb 2012 09:03:51 -0500

On Feb 14, 2012, at 2:52 PM, Bill Burke wrote:

>
>
> On 2/14/12 1:54 PM, Santiago Pericas-Geertsen wrote:
>>
>> On Feb 14, 2012, at 12:40 PM, Bill Burke wrote:
>>
>>>>
>>>> Could you comment on [1] to keep track of this?
>>>>
>>>> -- Santiago
>>>>
>>>> [1] http://java.net/jira/browse/JAX_RS_SPEC-170
>>>>
>>>
>>> FYI, I think this is a blocker issue as it will be impossible to
>>> support scanning without some way of designating a filter/interceptor
>>> as client or server only. I made some comments on the issue.
>>
>> I added a comment as well. I'm trying to understand what is the
>> environment and scope for this feature. There's two parts: (i) injection
>> and (ii) configuration. Is injection allowed in all JAX-RS managed
>> beans, EE managed beans, CDI beans, etc? What is the scope of the class
>> scanning process? What about a plain SE app?
>>
>
> Its not just an injection issue.

 Did I say it was? That's why I said there are two parts to it.

> If you have a WAR that is scanned, how is the scanner supposed to determine whether a @Provider filter/interceptor should be registered or not?

 Right, I understand. You are suggesting:

 @ClientScoped
 @Provider
 class ClientLoggingFilter extends RequestFilter { … }

 I still have questions about where these _configured_ Client instance are injectable and in what environments are JAX-RS implementations required to do class scanning? I'm assuming in WARs only.

-- Santiago