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

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

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 19 Feb 2013 09:12:48 -0500

On 2/19/2013 8:48 AM, 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).
>

Can you inject Configurable as well? Just wondering...

>> @Context ClientBuilder builder;
>
> I was hoping we have closed the client component injection topic with
> removal of @Uri for the time being.
>

That's fine, but, FWIW this is much different. Injecting a
ClientBuilder would require no special configuration and the container
could just initialize the builder with configured components (scanned
or via Application). This is quite unlike @Uri which would often
require outside external configuration of the underlying Client.

Bill

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