-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Chris Lee opened SPR-2237 and commented
The latest nightly build (2.0RC2 b69) fails to proxy beans whose implementation inherits from ApplicationObjectSupport.
With RC1, the following messages were logged:
10:36:58.469 INFO [Cglib2AopProxy] Unable to proxy method [public final org.springframework.context.ApplicationContext org.springframework.context.support.ApplicationObjectSupport.getApplicationContext() throws java.lang.IllegalStateException] because it is final: All calls to this method via a proxy will be routed directly to the proxy. [] [main]
10:36:58.469 INFO [Cglib2AopProxy] Unable to proxy method [public final void org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(org.springframework.context.ApplicationContext) throws org.springframework.beans.BeansException] because it is final: All calls to this method via a proxy will be routed directly to the proxy. [] [main]
With RC2b69, an exception is thrown with the following message:
Cannot proxy class 'bridges.facade.aa.AuthenticationFacadeImpl' since it has one or more public final methods.
...it looks like the implementation of Cglib2AopProxy.doValidateClass changed between RC1 & RC2b69.
One workaround would be to use JDK proxies, which works for this specific object; however, we have a number of legacy objects (now Spring-proxied for txns), which is why CGLIB proxying is enabled.
Affects: 2.0 RC2