There are quite some changes:- uses as now as said yesterday an ObjectResolver (I've to check with your refactoring) - fixed differend bugs in my original writeReplace/resolve code of the CGLIB proxy - JDK and CGLIB proxies implement LazyInitProxy. This can be useful to see if an object is already a lazy init proxy and to get the ObjectResolver from it (the cglib intercepors don't have to be serialziable anymore). - JDK and CLGIB: added handling of equals/hashCode methods (compares the proxy for identity - instead of forwarind to the target) - CGLIB: truned of the forward of the other Object methods to the target (especially finalize()) - exactly like for JDK proxies (toString() is forwarded)
- JDK proxies: better method invocation exception handling- JDK and CGLIB: when the result of a method call is the target itself it returns the proxy (at least one point of leaking of the target can be excluded) - I don't serialize the class but the class name and get it from the context ClassLoader - is this ok? - and finally all is now in one class which automatically makes either a cglib or class proxy (don't know wheter this is good)
There is also a rudimentary test case, which however only tests the CGLIB thing. There are also some println statements still in the code (it is hard to properly unit test the writeReplace/readResolve methods).
ChristianOn Wed, 9 Nov 2005 00:20:32 -0800, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
round 1 of refactoring is in. its much more elegant now. feedback please. -Igor
SerializableLazyProxyCreator.java
Description: Binary data
LazyInitProxy.java
Description: Binary data
ObjectResolver.java
Description: Binary data
SerializableLazyProxyCreatorTest.java
Description: Binary data