On Tue, 3 Sep 2002 03:06, Leo Sutic wrote:
> Peter,
>
> in the following:
>
> <provides>
> <role>
> <key>conn-manager</key>
> <interface>org.apache.avalon.ConnManager</interface>
> </role>
> </provides>
>
> the key, "conn-manager", implies "org.apache.avalon.ConnManager", right?
Ooops - I wrote that didn't I? Eek. Ignore that - it is wrong and not meant to
be there. The key is only meaningful for <requires/> or <dependency/> where
you need to lookup the component using key?
> So isn't the <interface/> element redundant?
>
> I assume you will use the <key/> to define exactly what attributes may
> be set for the connection manager. That is, "conn-manager" implies:
>
> + A certain interface (org.apache.avalon.ConnManager)
>
> + A set of attribute keys (for example, it may declare "is-secure")
>
> Is this a correct understanding of the <key/> element?
If this was a <requires/> or <dependency/> tag then yes.
> If it is, I really do not see the need for the <key/> element. It
> should be the same as the <interface/> element.
There are 2 problems with that. Stephen objects to it on principles and names
the components accorind to a shortname. The second problem is that if you use
2 services that have the same interface but act in different roles you end up
with keys like
org.apache.avalon.Store/persist
org.apache.avalon.Store/cache
org.apache.avalon.Store/spool
etc.
That make it any clearer what I mean?
--
Cheers,
Peter Donald
'Most men would rather die than think. Many do.'
Bertrand Russell
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>