RE: [picocontainer-dev] Preferring Parameter names.....
Konstantin Priblouda <kpriblouda-/[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Jörg Schaible <[email protected]> wrote: > However, a current component registering like > > pico.with(new NamedParameter("username", "paul :)"), > new NamedParameter ("password", > "p1")).addComponent(JDBCService.class); > > simply means, that the CDI algorithm will use the > parameters in the sequence they have been delcared > and simply ignore the names at all (at least this > was Pico 1.x functionality). The introduction of the > names was intended for a combined SDI/CDI approach. We still have to be able to specify name of configuration entry regardless of "formal" name. > > We already have: > > - by key parameters > > - by type > > - config ( by key / convert type ) > > - jndi ( get from ) > > - jmx ( get from ) > > Don't mix this up, these are completely different > levels: > 1/ by key parameters ==> direct assignment > 2/ by type ==> dependency injection > 3/ config ==> name injection (?) but name of configuration entry. > 4/ jndi (should be merged with JMX anyway) ==> > component lookup This is clearly gems, or better said - object reference based parameter ("object references are way to store objects in awkward places") - derivates of can also include looking up in servlet context / session / request / OGNL value stack I pretty oft find myself in need to inject something from request into component in my request scope container. Though this would be a bitch to cover in xml-based configuration approach... > The "simple pico" is more or less a priorized map > that tries to solve 1/ and 3/. I would also throw in 2/ because of historical reasons. regards, ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- JTec quality components: http://www.pribluda.de/projects/ ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469 --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email