Stephen wrote:
>  * Service locator
>
>    This is a new concept that is very similar to the
>    Merlin extension handler.  It a component that provides
>    a plug-in lookup solution that can be narrowed to a
>    particular interface (and can be located by the container
>    using the interface name as the key). A service locator
>    can be applied to the following three areas:
>
>      * context value lookup
>      * service lookup
>      * lifecycle stage handler lookup

If you have two interfaces:

interface A {
  void method ();
}

interface B {
  void method ();
}

and a dynamic proxy (or any class) implementing both interfaces:

class Proxy implements A, B {
   ...
}

Proxy proxy = ...;

The two calls:

((A) proxy).method ();
((B) proxy).method ();

are indistiguishable. This is true even if you are using a dynamic proxy's
InvocationHandler. (In which case they will both be calls to A.method.)

Unlike C#, Java has no way of distinguishing through what interface the
call was made.

I think this makes your idea less useful.

(Yes, I have a proposal of my own, writing it right now...)

/LS



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

Reply via email to