-----Mensagem original-----
De: Carsten Ziegeler [mailto:[EMAIL PROTECTED]
Enviada em: sexta-feira, 18 de junho de 2004 05:22
> Yes, I think dynamic lookup is one of the major advantages
> of Avalon. You can decide at runtime which components you
> need. This is not possible with setter/constructor injection.
Hmmm.. I think this is possible in a POJO world. Pico, for instance, use
component handlers and hints to (even) concrete implementations. LSD can
tell us more about that.
Meta-data or annotations (I think Peter Royal dislike it) can be used to
help on that.
I used that strategy in Avalon Castle.
public class VelocityTemplateProcessor implements TemplateProcessor
{
}
public class SpamMaker
{
/**
* @implementation-hint(VelocityTemplateProcessor)
*/
public SpamMaker(TemplateProcessor processor)
{
}
}
Cheers,
hammett
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Apache Excalibur Project -- URL: http://excalibur.apache.org/