> From: Peter Donald [mailto:[EMAIL PROTECTED]] > > On Sun, 2 Jun 2002 19:38, Leo Sutic wrote: > > > Depending on specific ThreadPool inside ThreadManager, > SocketFactory > > > inside SocketManager > > > > Hmm. Just guessing, but a role -> role + hint mapping could > do it. Let > > SocketFactory implement ComponentSelector and lookup > > SocketFactory.ROLE. This gets mapped to a lookup > (SocketManager.ROLE) > > and a select (hint). > > > > I think the key is to have the second lookup (to find the > component B > > that is contained in C) standardized via a interface. > > Personally I think the exact opposite ;) > > I HATE the ComponentSelector interface and think it is a huge > mistake to use > it.
I pretty much hate it too, but if the interface was never exposed to the client - that is, the second lookup (to find B in the example) is done by the container and all the client sees is a ComponentManager.lookup - then I consider it OK. The only reason for keeping the CS interface would be to let components like C implement it in order to make the lookup possible. > If the ComponentSelector is simply access to a category of avalon > components then I can't see why you can't depend on/lookup a > component > directly. Of course you can - but with CS you can select on other hints than a string. Of course you can do the Whatever -> String conversion and then do a straight lookup as you say, but it may make more sense to encapsulate it in a selector. /LS -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>