Carsten Ziegeler wrote:
Gianugo Rabellino wrote:
I'm definitely not a fan of constructor injection, exp. when we
consider how (way too) often we resorted to inheritance in Cocoon
components. Now, while interface injection is clearly out of fashion,
sticking with Avalon/Excalibur also means that it would be difficult
to get around the container (e.g., how do you release components with
your approach? I assume Excalibur still kinda needs that).

Yes, Excalibur still needs it - but it's easy. Bascially, you "emulate"
the service() method on construction of the object and then you
"emulate" the dispose method when destroying the object. Everything our
ecm++ needs to know is there. As I said, I've done this in Fortress and
we can use that code in ecm++ as well.
And we could implement setter injection with some kind of auto wiring as
well. It's not really that harder. But using setters again requires to
code more than using a constructor.

I'm with Gianugo on this one - I'd better have setter injection instead of constructor injection.

In *addition* to setter injection, ecm++ could also recognize annotations (if running under jdk 1.5).

Vadim