users@jersey.java.net

Re: [Jersey] Injection question - Guice + HttpServletRequest

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 07 Oct 2009 16:29:10 +0200

On Oct 7, 2009, at 4:09 PM, DirkM wrote:

>
>
> Paul Sandoz wrote:
>>
>> Moises is referring to the Guice Provider interface
>>
>
> Aha! Wow that really was easy :) Thanks Paul and Moises.
>
>
> Paul Sandoz wrote:
>>
>> Unfortunately it is not possible to mix Jersey-based and Guice-based
>> injection with constructors.
>>
>
> That's unfortunate.

Actually i spoke too soon. It should possible to support injection of
the JAX-RS types supported with @Context, like HttpHeaders. There are
a couple of tweaks required to make that possible, just need to find
the spare time to sort that out. But it is not possible to support the
@*Param annotations.

Paul.


> I like List<Locale> HttpHeaders.getAcceptableLanguages()
> much more than Enumeration<Locale> HttpServletRequest.getLocales().
> Enumerations are so 1995.
> --
> View this message in context: http://n2.nabble.com/Injection-question-Guice-HttpServletRequest-tp3777894p3782049.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>