RmiProxyFactoryBean interception [SOLVED]
I have an RMI service that I'm looking up via the RmiProxyFactoryBean. However whenever a remote method is called on the proxied bean I'd like an interceptor to be run.
I've tried to do this by wrapping the RmiProxyFactoryBean with a ProxyFactoryBean, but I get an error, since it's not possible to proxy a proxy:
java.lang.IllegalArgumentException: Cannot subclass final class class $Proxy12
at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer .java:446)
Anyone have any ideas how I can achieve this?