On Wed, 29 May 2002 01:48, Leo Sutic wrote: > I am revisiting Fortress after a logn time outside the curtain walls. > The thing I thought of is the need to expose different component > managers to different components.
ooer ;) > Let me describe the problem: > > Component A requires a component with role B. For example, a QueryEngine > requires a DBConnectionPool. > > Now, we add component C that also requires a component with role B. > Like, a Logger requires a DBConnectionPool to log into a database. > > Stuffing A and C into the same Container so that they get the same CM > makes it necessary to have them either use the same implmentation of B > or use a ComponentSelector. But then they have to be written to use a > CS. > > I'd like something like this: The way Phoenix solves this problem is <block name="A" class="AnImpl"> <provide name="B1" role="AnInterface" /> </block> <block name="C" class="AnImpl"> <provide name="B2" role="AnInterface" /> </block> <block name="B1" class="AnImpl"> </block> <block name="B2" class="AnImpl"> </block> > This way, A and C can look up each other, and have their own version and > configuration of B. > > Any thoughts about this? Heaps - I am actually working on generalizing the stuff in phoenix to move back into excalibur and was going to propose these exact same changes for Fortress ;) I will try to kickstart it this weekend. -- Cheers, Peter Donald -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>