On 3/8/08, Johan Compagner <[EMAIL PROTECTED]> wrote:
> >
>  >
>  >
>  > Well, it'll be built into v1.1 if you need it. :)  I took care of that
>  > yesterday.  It wasn't as easy as it might seem to make sure your
>  > proxies are serializable.  CGLIB didn't want to play nice.  They don't
>  > make their NoOp classes serializable for some reason.  I had a little
>  > easier time with Javassist and JDK proxies.
>  >
>
>
> I am playing now with the commons-proxy
>  But i dont get what method to call to get the right ProxyFactory..
>
>  You dont say that i have to use at compile time one of the ProxyFactory
>  implementations right?
>  Because then the whole purpose of commons-proxy is gone.
>
>  The thing is i want to be able to call something like this:
>
>  ProxyFactory factory = ProxyFactory.getInstance()
>
>  and then what ever instance i get back depends on configuration or classpath
>
>  I like the SLF4J approache where you just drop you wanted implementation in
>  the classpath and you are done.
>  But the commons-logging also works for me where you set it in a property
>  file which one to use.
>  But that last one has classloading problems i think so maybe it is not a
>  good idea to copy that...
>
>  So to mimic the slf4j you should have:
>
>  commons-proxy-api.jar
>  commons-proxy-cglib.jar
>  commons-proxy-javaassist.jar
>
>  and then if you want to use cglib drop in the commons api and the commons
>  cglib jar with the cglib jar itself.
>

Commons Proxy has no "discovery" built into it.  It's not really
designed for that.  You just need to instantiate what you want.  File
a JIRA for adding slf4j-like discovery and I'll post a discussion to
the rest of the dev list about it.

>
>  johan
>

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

Reply via email to