dev@jersey.java.net

Re: [Jersey] GuiceComponentProviderFactory seems to eagerly support resources that are not explicitly bound in the given Injector.

From: Jae Lee <jlee119_at_gmail.com>
Date: Wed, 23 Sep 2009 15:43:40 +0100

how do I do that Paul,
what's the process for an issue that is logged? does it go through community
vote whether to be done or not?
or is it given just a priority?

J

On Wed, Sep 23, 2009 at 3:40 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:

>
> On Sep 23, 2009, at 2:58 PM, Jae Lee wrote:
>
> Hi Paul,
>>
>> Yes, one specific use case of using multiple independent injectors are
>> when you've got two independent resources with dependency to the common
>> interface (in my example that will be Message), which then you might want
>> each resource to depend on different implementation of the common interface
>> (in my example that will be HelloWorld and HelloMe)
>>
>> I have to say the use case mentioned above is hypothetical, and I made it
>> up to demonstrate the current behaviour.
>>
>> A more general use case of using multiple injectors that I'm really coming
>> from would be when you want clear separation between group of resources
>> (vertical slice of application) and thus you want to manage dependencies for
>> those resources independently.
>>
>> With my understanding, it's OK to turn off the implicit instantiation,
>> because those root level classes that Jersey recognises are all explicitly
>> bound in the given Injector anyway... then actual instantiation will be done
>> by Guice which then might instantiate some implicitly bound dependencies.
>>
>> It's just somewhat weird to see all Injectors other than the first one are
>> ignored by ResourceComponentProvider, and totally different Injector is used
>> to construct Resource that wasn't bound within.
>>
>>
> OK, can you log an issue?
>
> Thanks,
> Paul.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>
>