Im trying to proxy an object that is not instantiated from the bean factory. So the usual programmtic approach using the ProxyFactory works fine. However I would prefer to use a more declarative approach where I get my ProxyFactoryBean from a configuration file and set the target programmatically. Something like:
As neither an interface nor a target has been supplied declaratively it doesnt work. Should I forget about this semi declarative approach and use the ProxyFactory or is there something I've missed? Using Spring 1.2.7. Cheers Niklas.
ProxyFactoryBean pfb = (ProxyFactoryBean)lbf.getBean("&proxyBean");
TargetObjectClass tac = (TargetObjectClass)pfb.getObject();
tac.hello(); //test interceptor