users@jersey.java.net

[Jersey] Re: Injecting Principal best practices

From: Martin Matula <martin.matula_at_oracle.com>
Date: Wed, 23 Feb 2011 17:00:16 +0100

Hi,
Great that it helped. Marek is a member of the Jersey team. He is mainly
working on Jersey 2.0 prototyping, so is not that visible yet.
Martin

On 23.2.2011 16:48, Christopher Piggott wrote:
> I'm not sure who Marek Potociar is, but said person just checked in a
> sample of using jersey-guice to directly inject what I need. Thank
> you!
>
>
>
> On Fri, Feb 18, 2011 at 6:10 AM, Jakub Podlesak
> <jakub.podlesak_at_oracle.com> wrote:
>> Hi Christopher,
>>
>> i am not a Guice expert, but just in case.
>>
>> There is a Jersey example [1] showing integration with Guice.
>> You can then combine Jersey/Guice injection,
>> so that not everything gets injected by Jersey.
>>
>> Would that help?
>>
>> ~Jakub
>>
>> [1]http://download.java.net/maven/2/com/sun/jersey/samples/guicefilter-webapp/1.6-ea03/guicefilter-webapp-1.6-ea03-project.zip
>>
>> On 02/16/2011 02:29 PM, Christopher Piggott wrote:
>>> Absolutely. Hopefully what I wrote makes sense.
>>>
>>> The thing about this I'm not entirely sure of is where I should have
>>> solved the problem some other way; for example, in some context
>>> listener somewhere, find the context and inject the SpecificPrincipal
>>> there.
>>>
>>> I am probably being thick but I really wish there were no @Context at
>>> all and I could just handle everything via guice. In the guice way, I
>>> think that each request would get its own childInjector. @Context
>>> would, I think, be unnecessary. (I could be wrong, I'm not super
>>> knowledgable about @Context other than getting the few things I need
>>> from it).
>>>
>>>
>>>
>>> On Tue, Feb 15, 2011 at 9:01 AM, Marek Potociar
>>> <marek.potociar_at_oracle.com> wrote:
>>>> can you please file an enhancement request here:
>>>> http://java.net/jira/browse/jersey
>>