users@jersey.java.net

Re: [Jersey] IoC: Inject instance of type that has two configured beans

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Thu, 19 Jun 2008 09:25:33 +0200

On Mon, 2008-06-16 at 17:26 +0200, Paul Sandoz wrote:
> Paul Sandoz wrote:
> >>> I think it needs have an optional name parameter, a bit like EE
> >>> @Resource. I cannot think of anything else. From your use-case that
> >>> would appear sufficient to uniquely identify different instances.
> >> Sounds good. Are you going to implement this, can I help with s.th.?
> >>
> >
> > How about I do the Jersey related stuff, and when finished you do spring
> > support for @Inject ?
> >
>
> Done.
Great!

jersey-spring now evaluates the @Inject.value: If Inject.value is set
the SpringComponentProvider asks spring for a bean of the specified
name, otherwise the SpringComponentProvider chooses the former approach
(type based bean lookup).

Cheers,
Martin

>
> Paul.