On Tuesday, October 22, 2002, at 10:59  AM, Vjeran Marcinko wrote:
Hi folks.
I have experience only with ECM, and I guess this question will sound really stupid, but I'm total newbie in COP ...
Lets say I have couple of components and each containing its own instance of same child component. That means implementation of my child component cannot be ThreadSafe but SingleThreaded, thus allowing all parents to get its own instances by calling lookup in their compose() methods. Now my question is - What is proper way to parameterize this child component by parent components if this parameter is supose to be different for each child instance? Of course, this parameterization should happen before lookup method is called in parents' compose() methods, and cannot figure out when and where ? Till now, I usually parameterized component on global level, and this parameter was not dependant upon parent component, but now > ...
Let me make sure I understand your situation and then lets discuss possibilities...

You have a group of components, lets call them Group A. Each one of them requires a component of type B to do its job. Each component in Group A will require its own component of type B, configured(parameterized) for its specific needs. Yes?

I would recommend using the ComponentSelector. Type B is really a Role, and you have multiple components that fulfill that role (even if its the same java class, they are configured differently).

Components in Group A would then do a lookup() which will return a ComponentSelector interface. From that interface you will then be able to select which specific 'Type B' component you wish to use.
-pete

--
peter royal -> [EMAIL PROTECTED]


--
To unsubscribe, e-mail: <mailto:avalon-users-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-users-help@;jakarta.apache.org>



Reply via email to