avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: [proposal] avalon 5 ComponentManager interface
Date Wed, 12 Jun 2002 13:22:07 GMT

> From: Berin Loritsch [mailto:bloritsch@apache.org] 
> One point to consider.  How many projects do you desire to 
> use your components with?


I understand the namespace clash you describe, but what I
propose in the referenced emails solve that by, for each
component, providing a unique role mapping.

Do this in your mind:

You have a list of components. Tag each one with a unique id.
Each component has a list of roles it will look up (dependencies).
Now, for each component, provide a map role->component id.


So, suppose LeosComponent looks for a source resolver at "resolver",
and StephensComponent looks for it at "source-resolver":

  <component id="leo" class="LeosComponent">
    <provide role="resolver" via="the-one-resolver"/>

  <component id="stephen" class="StephensComponent">
    <provide role="source-resolver" via="the-one-resolver"/>

  <component id="the-one-resolver" class="SourceResolverImpl"/>

This also solves the problem where LeosComponent and StephensComponent
looks up the *same* role, say "source-resolver" but need *differently
configured* SourceResolvers:

  <component id="leo" class="LeosComponent">
    <provide role="source-resolver" via="leos-resolver"/>

  <component id="stephen" class="StephensComponent">
    <provide role="source-resolver" via="stephens-resolver"/>

  <component id="leos-resolver" class="SourceResolverImpl"
  <component id="stephens-resolver" class="SourceResolverImpl"

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

View raw message