You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Valentin Mahrwald <vm...@googlemail.com> on 2009/12/01 12:41:17 UTC

Field injection for Aries blueprint

Hi,

what do people think about supporting field injection in Aries  
blueprint?

It's not in the OSGi blueprint spec, but a lot of other JEE specs  
support field injection (Servlet, EJB3, JPA ...), so developers might  
assume the convenience of not having to write pointless getters and  
setters.

An Aries specific extension to blueprint could then allow field  
injection per bean or per blueprint module controlled via a custom  
namespace attribute. At runtime this would allow the Blueprint  
container to inject a property directly into a field (regardless of  
visibility). However, this alternative approach would only be used if  
a setter is not available (so setters would always take precedence).

If there no violent objections, Ozzy and I will look into implementing  
this ;)

Regards,

Valentin

Re: Field injection for Aries blueprint

Posted by Guillaume Nodet <gn...@gmail.com>.
Sounds good to me, as long as the default is spec compliant and that
this behavior is activated using a custom namespace.

On Tue, Dec 1, 2009 at 12:41, Valentin Mahrwald
<vm...@googlemail.com> wrote:
> Hi,
>
> what do people think about supporting field injection in Aries blueprint?
>
> It's not in the OSGi blueprint spec, but a lot of other JEE specs support
> field injection (Servlet, EJB3, JPA ...), so developers might assume the
> convenience of not having to write pointless getters and setters.
>
> An Aries specific extension to blueprint could then allow field injection
> per bean or per blueprint module controlled via a custom namespace
> attribute. At runtime this would allow the Blueprint container to inject a
> property directly into a field (regardless of visibility). However, this
> alternative approach would only be used if a setter is not available (so
> setters would always take precedence).
>
> If there no violent objections, Ozzy and I will look into implementing this
> ;)
>
> Regards,
>
> Valentin
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com