On 3/8/08, Torsten Curdt <[EMAIL PROTECTED]> wrote:
>
>  On 08.03.2008, at 13:44, James Carman wrote:
>
>  > All,
>  >
>  > The wicket folks are investigating using Commons Proxy and they don't
>  > want to have to decide which implementation (jdk, cglib, javassist) to
>  > use themselves.  They would like us to split up Commons Proxy into 3
>  > jars, commons-proxy, commons-proxy-cglib, commons-proxy-javassist.
>  > Any thoughts?
>
>
> Is the discovery such a big problem with proxy? ...in general I
>  prefer the static discovery type. But someone has to do it.

Well, Johan makes a good case.  He's writing some code that he wants
to use Proxy, but he doesn't want to have to figure out what
implementation to use himself.  He'd rather it be done automatically
for him, by doing something like ProxyFactory.getInstance().  I
thought about this at one time.  I guess we could say, instantiate
your class that's based on Proxy by passing in whatever implementation
the client wants.  So, he could have something like:

public class MyFrameworkClass
{
  public MyFrameworkClass(ProxyFactory proxyFactory)
  {
    this.proxyFactory = proxyFactory;
  }

  public Object createSomeKindOfProxy(SomeArgument arg)
  {
    return proxyFactory.create...
  }
}

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

Reply via email to