RE: [picocontainer-dev] [Paul?] DPC.initForConfig()

Jörg Schaible <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Hi Konstantin,

Konstantin Priblouda wrote on Tuesday, August 14, 2007 8:35 AM:

> --- Paul Hammant <[email protected]> wrote:
> 
>> Sorry Konstantin, I'm not understanding...
>> 
>> Don't you think that 'Ambiguous' is clearer than
>> 'Unsatisfiable' in
>> this case ?
> 
> Not really. In this case there is no dependency
> available (technically) but since current variant of
> DPC fakes 9 primitive deps it becomes "Ambiguous" (and
> I start asking myself  WTF there are 11 components
> registered instead of 2)
> 
> It is good idea to not to resolve config paramns by
> type, but it shall be done in APC.

here I am with Paul. The API/impl might not be right yet, but in general the functionality shoud go somehow into DPC. See, config params are essentially different to components and in Pico 1.x this was a main culprit that they were mixed up (unless you registered your component with explicit params). The config params might be provided by arguments, but can also be read from config files, retrieved by a DB, extracted by Paranamer, ...

Maybe we need an additional callback interface that is used when the other deps are resolved - something like Map<String, Object> ParameterProvider.getParameter(key, componentType);

- Jörg

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.