> From: Stephen McConnell [mailto:[EMAIL PROTECTED]] 
>
> 
> Peter Donald wrote:
> 
> >On Tue, 1 Oct 2002 19:10, Leo Simons wrote:
> >  
> >
> >>>Any other comments?
> >>>      
> >>>
> >>This adds additional semantic meaning to the lookup key, 
> modifying the 
> >>sm contract.
> >>    
> >>
> >
> >nope. See other mail - it adds meaning to the type not the 
> lookup key.
> >
> >  
> >
> >>What if I have an application deployed in phoenix 4.0 that just 
> >>happens to postfix about half of its components with "#"? It will 
> >>break in the next release.
> >>    
> >>
> >
> >False. It is an impossible contract as previously they were 
> interpreted 
> >as
> >pure classnames in which case both [] and # were not viable 
> within phoenix.
> >  
> >
> 
> Now that's incorrect.
> That is absolutely not criteria that states that a lookup key is an 
> interface class name.
> Steve.

In the context Peter says it, he's right. Like this:

Suppose you have this:

    <dependency>
      <service interface="org.MyService">
    </dependency>

In Phoenix, you can look up the dependency with the key "org.MyService"
OR you can give it a role name:

    <dependency>
      <role>myservice</role>
      <service interface="org.MyService">
    </dependency>

and use "myservice" as a lookup key.

What Peter means is that in the case where the role defaulted to the
interface
name, there was no way you could have [] or # in the role. If you had
explicitely
specified a role name, then that will be unchanged. That is, if I had:

    <dependency>
      <role>myservice#</role>
      <service interface="org.MyService">
    </dependency>

Then lookup ("myservice#") will *still* give me a MyService interface,
and not a 
map, because the dependency is still on an interface and not a map.

1.
    <dependency>
      <role>myservice#</role>
      <service interface="org.MyService">
    </dependency>

lookup ("myservice") <ERROR>
lookup ("myservice#") instanceof org.MyService

2.
    <dependency>
      <role>myservice#</role>
      <service interface="org.MyService#">
    </dependency>

lookup ("myservice") <ERROR>
lookup ("myservice#") instanceof java.util.Map

3.
    <dependency>
      <role>myservice</role>
      <service interface="org.MyService#">
    </dependency>

lookup ("myservice") instanceof java.util.Map
lookup ("myservice#") <ERROR>

/LS


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

Reply via email to