|
From: Rob H. <ro...@ca...> - 2004-06-25 11:22:40
|
Yes using the equalsInProxy method means that the target has an effect on whether or not the proxy class is reused when really is shouldn't have that much of a say. I refactored AopProxyUtils.equalsInProxy moving some of the logic into separate methods, which I now use for the comparison in ProxyCallbackFilter,equals. I updated the test to test when the targets are different and it now passes. The comparison in ProxyCallbackFilter comapres the advisors and proxied interfaces along with the frozen, targetsource.static and exposeproxy flags. If all these are the same then the proxy class will be reused. Tyson, I committed this update - give it a try! Rob On 25 Jun 2004, at 00:34, Chris Nokleberg wrote: > Norris, Tyson wrote: >> (Using the CVS version 1.8 Cglib2ApoProxy) I get everything to work >> fine >> with the test case I mentioned below even when both proxies are >> advised, >> unless I remove the equals() method from TestBean. > [snip] >> So, my question is - why should this affect whether CGLIB can cache >> the >> generated class? I'm back to not understanding if the problem is in >> CGLIB, or Cglib2AopProxy. (or, maybe I'm missing some understanding, >> and >> the equals method on my beans truly is required...) > > The new ProxyCallbackFilter class still uses > AopProxyUtils.equalsInProxy in > its equals method. equalsInProxy uses equality of the AdvisedSupport > TargetSource. Depending on the implementation of TargetSource being > used, I > think this means it *is* possible for your target bean's equals method > to > affect CGLIB caching behavior. I'm not qualified to say whether this is > desirable or not. > > Chris > > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |