geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: [xbean] annotation based dependency injection
Date Wed, 05 Apr 2006 06:39:20 GMT
BTW I think JSR 250 is kinda frozen now (despite not being final);
though I'm hoping if we all get behind it and use it as the basis of
AnDI we can get another minor update done later on - e.g. to remove
the restriction on no checked exceptions on @PostConstruct/@PreDestroy
methods. etc.

James

On 4/5/06, James Strachan <james.strachan@gmail.com> wrote:
> On 4/4/06, David Blevins <david.blevins@visi.com> wrote:
> >
> > On Apr 3, 2006, at 5:12 AM, James Strachan wrote:
> >
> > > > so I'm sure the XBean/OpenEJB folks will be implementing this
> > > anyway.
> > >
> > > I'm not yet at that point in understanding what Dave B. has already
> > > done in OpenEJB 3, but you're right it will be of high priority to
> > > implement.
> > >
> > > Agreed. Adding support for AnDI into XBean would be pretty easy
> > > then OpenEJB could reuse that. I ultimately want the entire
> > > Geronimo kernel to support AnDI; whether you use EJB3 or not.
> >
> > Trick is the @Resource annotation can't be used to annotate a
> > constructor.
> >
> > Know anyone on JSR 250 who'd propose changing that?
>
> Good point - though before JSR 250 & EJB 3, when Pico was just
> starting, I tended to use the convention that contructor arguments
> were 'mandatory' properties and setter methods were for optional stuff
> (or stuff that can be configured after construction).
>
> i.e.  its kinda implicit that any constructor arguments must be
> injected to be able to construct the object - so they are mandatory
> already. I guess a container could shove in null objects or zero
> values if it can't find a value, but maybe its easier to just say that
> for constructor injection, the parameters should be considered
> mandatory?
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>


--

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message