Re: [picocontainer-dev] Multi Injection
Jörg Schaible <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Paul Hammant wrote:
> Well the next thing is to make the setters optional for the multi
> type .... people are using this mechanism for optional params. CDI
> args are mandatory, and SDI args are optional I mean.
>
> I agree that we should not recommend it, but it is used as a model.
In pre-Pico 1.x times we always set that up as nested CA (unfortunately it
did not work properly, but that was a problem of the code). IMHO this
should work similar to the PropertyAppicator/Applying.
Why not create a DefaultConstructorFactory (implementing InjectionFactory)
that requires a component to have a default ctor with no args? You could
implmenet SI as Behaviour and the DCF for pure SI ... or combine it with
CI. The problem is, how do you know which deps you really need, which ones
are consumed by CI and which ones are optional for SI.
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email