|
From: Norris, T. <tys...@be...> - 2004-06-25 20:06:38
|
That seems to have done the trick - thanks Rob! Tyson -----Original Message----- From: Rob Harrop [mailto:ro...@ca...]=20 Sent: Friday, June 25, 2004 4:23 AM To: spr...@li... Subject: Re: [Springframework-developer] RE: Not leveraging the CGLIB cache Yes using the equalsInProxy method means that the target has an effect=20 on whether or not the proxy class is reused when really is shouldn't=20 have that much of a say. I refactored AopProxyUtils.equalsInProxy=20 moving some of the logic into separate methods, which I now use for the=20 comparison in ProxyCallbackFilter,equals. I updated the test to test=20 when the targets are different and it now passes. The comparison in=20 ProxyCallbackFilter comapres the advisors and proxied interfaces along=20 with the frozen, targetsource.static and exposeproxy flags. If all=20 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=20 >> fine >> with the test case I mentioned below even when both proxies are=20 >> advised, >> unless I remove the equals() method from TestBean. > [snip] >> So, my question is - why should this affect whether CGLIB can cache=20 >> the >> generated class? I'm back to not understanding if the problem is in >> CGLIB, or Cglib2AopProxy. (or, maybe I'm missing some understanding,=20 >> and >> the equals method on my beans truly is required...) > > The new ProxyCallbackFilter class still uses=20 > AopProxyUtils.equalsInProxy in > its equals method. equalsInProxy uses equality of the AdvisedSupport > TargetSource. Depending on the implementation of TargetSource being=20 > 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 > ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 -=20 digital self defense, top technical experts, no vendor pitches,=20 unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |