users@jersey.java.net

Re: spring-integration: initiating webapplication fails with @Context annotated field in AbstractJAXBElementProvider

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Fri, 11 Apr 2008 13:18:29 +0200

On Fri, 2008-04-11 at 11:52 +0200, Paul Sandoz wrote:
> Martin Grotzke wrote:
> > If we would use the annotation-injectable way the spring-integration
> > module could define it's own @Inject annotation and inject beans pulled
> > from spring. The disadvantage is, that this logic has to be duplicated
> > for different IoC-backends...
> >
>
> My understanding is there are two requirements:
>
> 1) Support annotation-based injection on fields for IoC frameworks that
> do not have such capability; and
>
> 2) Support constructor/method parameter injection of IoC registered
> instances.
>
> Given that we ran into an issue with using @Context for 1) then perhaps
> we should have a different annotation like you proposed that is clearly
> separate from @Context. If we make changes to Injectable it should easy
> to support, and that way we also support Frank's requirements.
>
> For 2) we still require are our own annotation, as i don't see any
> features in Guice/Spring to allow intermixing of parameter injection
> responsibilities (that could change as we learn more).
>
> So i think i am leaning towards the following:
>
> 1) Supporting injectable per annotation and injectable per
> annotation+type;
>
> 2) Use a new annotation as you previously said (you were right!)
> to specify deferring to an IoC framework;
>
> 3) Implement an injectable per annotation, from 1), for 2); and
>
> 4) Implement a parameter injectable for 2).
>
> Sound like a plan?
Like a good one - as far as I understand :)
I haven't looked at constructor/method parameter injection, so I have no
idea how this is realized - I'll have a look at the code to get an
idea...

Cheers,
Martin

>
> Paul.
>
> --
> | ? + ? = To question
> ----------------\
> Paul Sandoz
> x38109
> +33-4-76188109
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net