> -----Original Message-----
> From: Berin Loritsch [mailto:[EMAIL PROTECTED]]
> Sent: den 1 oktober 2002 14:39
> To: Avalon Developers List
> Subject: Re: Map and Array Dependencies
>
>
> Leo Sutic wrote:
> >
> >>From: Peter Donald [mailto:[EMAIL PROTECTED]]
> >>
> >>Hi,
>
> > ---------------------- Alt 2
> >
> > I think that the use of the postfix magic character(s), #
> and [], in
> > the
> > lookup() call *must* go, since they imply that the returned
> type (map or
> > array or object) isn't part of the role, but can be determined at
> > runtime.
> >
> > Let the role string, when used in the lookup() call, remain
> an opaque
> > string.
> >
> > I should be able to do:
> >
> > MyService[] services2 =
> > (MyService[])sm.lookup( "incoming-queues" );
> >
> > MyService[] services3 =
> > (MyService[])sm.lookup( "outgoing-queues" );
> >
> >
> > To return to your example:
> >
> > <dependencies>
> > <dependency>
> > <service name="org.apache.MyService[]"/>
> > </dependency>
> > </dependencies>
> >
> > +1 - this means that I have a dependency on an array of MyService.
>
>
> Concidering that someone (I think it was Stephen) greatly
> opposed the semantic of "Selector" to refer to a
> Service/Component Selector, adding in additional constraints
> on the meaning of a lookup key is not a good idea.
We're not. I thought we were, but we're not.
> I am missing a large part of the conversation, so I am not
> sure what problem the solution is for.
http://marc.theaimsgroup.com/?l=avalon-dev&m=103346011218360&w=2
> I believe it was
> Peter D. that suggested writing an XXXManager for any
> specific set of components that fulfilled the same role.
> That provides the maximum amount of flexibility in lifecycle
> and convenience methods.
I think the gain outweighs the cost in this case. We're not adding
any semantics to the lookup key, only semantics to the dependency
declaration (which is decoupled from the lookup key).
As you, I have no immediate problem for this to solve, but
apparently someone has, and since the cost of adding this is zero,
I don't see why not.
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>