users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: can you _at_Context inject Configurable or Configuration?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 19 Feb 2013 13:59:43 +0000

On 19/02/13 13:48, Marek Potociar wrote:
>
> On Feb 19, 2013, at 2:39 PM, Bill Burke <bburke_at_redhat.com
> <mailto:bburke_at_redhat.com>> wrote:
>
>> I'm writing a sub-chapter on component registration and came across a
>> problem. Is there any way of leveraging scanning so we can build a
>> Client from scanned components? Would this work server side?
>>
>> @Context Configurable configurable;
>
> Should the above be Configuration? Configuration can be injected into
> server side components (providers/resources).
>

Interesting... How would one utilize Configuration if it were injected
into a (root) resource ? I can think of checking the properties possibly
set from the inbound filters (not sure yet these will be accessible from
Configuration), but it seems the rest of Configuration should not be
visible to the application code ?

Should the injection of Configuration be limited to say Application and
may be providers only ?

Cheers, Sergey

>>
>> {
>> Client client = ClientBuilder.newClient(configurable);
>> }
>>
>> Another option is to allow injection of a ClientBuilder:
>>
>> @Context ClientBuilder builder;
>
> I was hoping we have closed the client component injection topic with
> removal of @Uri for the time being.
>
> Marek
>
>>
>>
>>
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>