users@jersey.java.net

Re: [Jersey] Support for injecting named beans into Jersey resources

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 19 Feb 2009 10:29:49 +0100

On Feb 18, 2009, at 11:13 PM, Chris Winters wrote:

> FWIW I've done this in Spring using the @Resource annotation.
>

Yes. Plus the @Qualifier annotation can also be used.

See the spring-annotations sample which uses @Resource and @Qualifier:

   http://download.java.net/maven/2/com/sun/jersey/samples/spring-annotations/1.0.2/spring-annotations-1.0.2-project.zip

Jersey also provides an annotation to use on methods that Jersey
invokes (not Spring) to obtain Spring beans:

   https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.2/api/jersey/com/sun/jersey/spi/inject/Inject.html

Paul.

> Chris
>
>
> On Feb 18, 2009 4:41 PM, "Andrew Feller" <afelle1_at_lsu.edu> wrote:
>
> I know there is support for autowiring, however I need to inject
> beans based upon name rather than type/class. Are there any plans
> for this support? Is it available within the 1.0.2 stable release?
>
> Thanks,
> Andrew
>
> --
> Andrew Feller, Analyst
> LSU University Information Services
> 200 Frey Computing Services Center
> Baton Rouge, LA 70803
> Office: 225.578.3737
> Fax: 225.578.6400
>