On Tue, 1 Oct 2002 18:50, Leo Sutic wrote:
> # is fine. Besides having the best smiley, # is called "hash",
> and associates to HashMap for me.

that was my logic aswell ;)

> If this type of lookup behavior is part of framework, then maybe the
> correct solution is to add methods to the ServiceManager interface.
>
> MyService.ROLE + "[]"  --> ServiceManager.lookupAll (String role);
> MyService.ROLE + "#"   --> ServiceManager.lookupMap (String role);
>
> Ignoring backwards compatibility here. 

Theres quite a few things I would like to do if it weren't for backwards 
compatability and this may be one of them ;)

> ---------------------- 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.

My mistake. "#" and "[]" and postfixed to the type. If no role is specified 
then it will default to the type but you can still remap it via something 
like;

<dependencies>
  <dependency>
    <role>incoming-queues</role>
    <service name="org.apache.MyService#"/>
  </dependency>
</dependencies>

However if no role is specified it will default to the type (much like in 
normal case).

-- 
Cheers,

Peter Donald
------------------------------------
The two secrets to success:
   1- Don't tell anyone everything.
------------------------------------ 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to