Daniel Krieg wrote:
I am developing a component that declares a dependency on two services of the same type in different roles.
<snip/>
I suspect that I need to provide a Selector that will choose the appropriate service role.
Correct.
If I am correct in this assessment, is it not possible for Merlin to provide a DefaultRoleNameSelector that maps the component name (which exists in the appliance://worklist, for example) to the lookup key used by the dependent (serviceManager.lookup("worklist"), for example)? This will allow developers to be explicit about the assembly (as Phoenix provides) without the need to declare and implement the Selector and without minimizing the dynamic assembly capabilities inherent in Merlin. Thoughts?
This is one of the issues I'm addressing under the composition api. Currently the declaration of the requirement for a selector is tied into meta-info (using a attribute). I want move away from that approach towards meta-data directives that override auto assembly huristics.
For example:
<component name="fred" class="MyComponentClass">
<dependencies>
<dependency key="my-key">
<select>
<feature key="name" value="george" match="required"/>
</select>
</depedency>
</dependencies>
</component>What the above is basically saying is that for the dependecy declared under "my-key", the assembly system would be required to select a candidate with a matching name.
How does this sound?
Cheers, Steve.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED] http://www.osm.net
Sent via James running under Merlin as an NT service. http://avalon.apache.org/sandbox/merlin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
