|
From: Chris N. <ch...@si...> - 2004-10-20 20:27:48
|
Rob Harrop wrote: > That is why I have held fire on this for a while. In order for Spring to > create a proxy of a class with no default constructor we need to pass > the args and the arg types to Cglib. These need to come from somewhere. > You can see how they are added to the Cglib proxy by looking at > Cglib2AopProxy. I sm not too sure on how we should go about adding this > to ProxyFactory and ProxyFactoryBean. BTW, in the case that the target class implements Serializable, it is theoretically possible to skip constructor invocation altogether, which would of course eliminate the need to pass any constructor arguments in. This would require some changes to CGLIB, and probably there aren't too many classes out there that you'd want to proxy and are Serializable but don't have a default constructor, but I thought I'd throw this out there. Chris |