james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Fondermann" <bernd.fonderm...@googlemail.com>
Subject Re: [mailets] POJOs (and in particular SieveToMultiMailbox)
Date Wed, 03 Sep 2008 07:17:08 GMT
On Tue, Sep 2, 2008 at 23:49, Robert Burrell Donkin
<robertburrelldonkin@gmail.com> wrote:
> On Tue, Sep 2, 2008 at 10:32 PM, David Jencks <david_jencks@yahoo.com> wrote:
> <snip>
>> FWIW although you have to supply some metadata (currently via code or
>> annotations) Geronimo can construct components through constructor
>> injection: there shouldn't be any problem constructing a maillet.
>> I thought spring could too if you jumped through enough configuration hoops
>> but I'm definitely not a spring expert.
> i've read that it can (spring is pretty flexible)
>> I am really really strongly in favor of constructor injection of final
>> fields.
> i use that pattern a lot since it has good concurrency characteristics
> though setter injection is much more popular
> (mailets should be protected by their container so this shouldn't be
> such an issue in this case)
> IMHO the best approach for the mailets James ships would to be
> agnostic and support both types of injection by providing appropriate
> setters and constructors

I'm a lot fiddling around with designing beans these days and what I
learned is that you have to decide which injection to use on a
case-by-case basis. generally, SDI works pretty good, and I'd second
that for final fields CDI is a first consideration. but there is no
golden rule like XDI is always better than YDI.


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message