User development, A new message was posted in the thread "Proxy SPI":
http://community.jboss.org/message/526048#526048 Author : jaikiran pai Profile : http://community.jboss.org/people/jaikiran Message: -------------------------------------------------------------- > jaikiran wrote: > > Based on our discussion yesterday about a need for a proxy-spi, here's what > my initial thoughts are. The following SPI keeps in mind both nointerface > view (which uses Javassist) and the other business view (which use > j.l.r.Proxy). > > My initial thoughts around this were, to have a ProxyFactory which at the > minimum has this: > > *public* *interface* ProxyFactory > { > > /** > * Creates a proxy which is castable to the interfaces passed and associates > * the passed invocationHanlder with the proxy > */ > Object createProxy(Class[] interfaces, InvocationHandler > invocationHandler); > ... > > } > > > > > With this, we could then have had a JavaReflectProxyFactory which would > return Proxy.newInstance(...) and a JavassistProxyFactory which would do its > own proxy creation logic. Note that currently the Javassist proxy factory for > nointerface view uses a j.l.r.InvocationHandler, but that's a implementation > detail, and as such should not be exposed through the SPI. i.e. the > createProxy shouldn't ideally be expecting a j.l.r.InvocationHandler as a > param. After discussing this with Carlo over IRC, i realize that expecting InvocationHandler isn't a bad deal after all. Infact the above SPI looks much simpler and better compared to what i came up with, in the rest of my previous post. -------------------------------------------------------------- To reply to this message visit the message page: http://community.jboss.org/message/526048#526048
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
