Paulo Gaspar wrote: > And Hi again, > =:o) >>Well it comes down to what is intended to be pulled out from the manager. >>A4CM is intended to be used to pull out services while A4Context/A5CM is >>intended to pull out data relevent to specific >>environment/context/whatever. >> > > Nops. I often pull very life components, like DB connections or SQL queries > (we like to put SQL query templates in XML). But I also get strings and > static lists of records.
For the record, DB Connection Objects && SQL Queries != Component. The DataSource interface and any implementation can be construed as a Component, because the interface is intended as an access point to data (The Connection object). Components should strive to have a simple interface that only exposes enough detail for clients to do their job. >>In A4CM the string is required to indicate a ROle/interface while in >>A4Context the key is an object. (In hindsight a free form string may have >>been better). >> > > I thought so at first but I find it very practical to do things like this: > > IConverter cvt = ctx.get(IConverter.class); > > This gets the type conversion "service" from my context. See? I use the > context as a ServiceManager! > =;o) > > I still found no problems with this approach. BTW, What you call a service, we call a Component. -- "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>