Vadim Gritsenko wrote:
Ugo Cei wrote:

I'll try to reword the manifesto to cover the possibility of building our own container, as long as it adheres to some basic design principles.



Not completely OT, but does / can / will Fortress support constructor / setter dependency injection?

Fortress *can* support any kind of construction, but there are some modifications that need to be made.


At its core, Fortress uses a ComponentFactory to manage the creation and destruction phases of the component. Now, having said that, there isn't any way to expose how/when to override the one included for Avalon compliance.

Working with the way Fortress is designed with no modifications, you can do the setter DI through a Creator lifecycle extension--but not the constructor injection.

Now, Dojo (the mini container I wrote at D-Haven) has all this exposed and it is made to be flexible and modular. Of course this is no panacea either. By default it supports setter DI because that was most natural to someone who works with JavaBeans. I started to do some Avalon support for it, but I kind of stalled that work for the time being. There were some other things I wanted/needed to take advantage of first so that I could get the GUIApp application working with Dojo.

However, the Dojo design would allow you a nice, flexible base to build whatever container you wanted for Cocoon. It also employs a very nice listener model where you can implement all sorts of cool features at a later date--regardless of whether the component is constructor DI, setter DI, or Avalon (hybrid DI?).

Oh, just so you all know, Fortress has been updated to us the D-Haven Event package. It is better tested, and is less complicated than the Excalibur version. Just know that if you have less that JDK 1.4 (i.e. 1.3) then you will only have one thread for all background management. Fortress manages that decision.

--

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
- Rich Cook




Reply via email to