Daniel Krieg wrote:
<snip/>
<snip/><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?
<select/> seems useless -- what else could you do?
Quite a bit actually. Instead of locking in on the selection by name, you would be able to describe quality-of-service criteria.
Consider this...
<component name="george" class="MyComponentClassA"/> <component name="henry" class="MyComponentClassA"/> <component name="fred" class="MyComponentClassB"> <dependencies> <dependency key="my-lookup-key-1"> <feature key="name" value="george" match="required"/> </dependency> <dependency key="my-lookup-key-2"> <feature key="name" value="henry" match="required"/> </dependency> </dependencies> </component>
...and since the name-binding of a service is not REALLY a feature of the service, perhaps...
<component name="george" class="MyComponentClassA"/> <component name="henry" class="MyComponentClassA"/> <component name="fred" class="MyComponentClassB"> <dependencies> <dependency key="my-lookup-key-1" provider="george"/> <dependency key="my-lookup-key-2" provider="henry"/> </dependencies> </component>
Problem here is that it would lock us into selection by name. Instead I want something more generic. Consider the following:
<component name="george" class="MyComponentClassA"/>
<component name="henry" class="MyComponentClassA"/>
<component name="fred" class="MyComponentClassB">
<dependencies>
<dependency key="my-lookup-key-1">
<feature key="supplier" value="ASF" match="optional"/>
<feature key="name" value="henry" match="exclude"/>
</dependency>
<dependency key="my-lookup-key-2">
<feature key="name" value="henry" match="required"/>
</dependency>
</dependencies>
</component>In the above scenario, I can influence the selection process based on attributes. This means I can use QoS parameters to drive the selection process. This covers both selection by name and selection by QoS.
Basically you get what you want (selection by name) and I get what I want (selection by attribute matching).
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]
