Rob Winch opened SPR-16733 and commented
The changes for in b5922f75 means that now unnecessary objects are proxied.
MethodMapTransactionAttributeSource now uses now uses ReflectionUtils.getAllDeclaredMethods which means that when something like addTransactionalMethod("sample.Foo.*", ...) is invoked, all the methods (including the methods on Object) are added to the transactionAttributeMap.
Then when a method from Object is queried on any class (i.e. MethodMapTransactionAttributeSource.getTransactionAttribute(finalizeMethod,JdbcTemplate.class)) the result is true, so every object ends up getting proxied.
A complete example of the issue can be seen at https://github.com/rwinch/spring-aop-proxy-issue/blob/master/src/test/java/sample/ProxyTests.java
Affects: 5.0.6
Issue Links:
Rob Winch opened SPR-16733 and commented
The changes for in b5922f75 means that now unnecessary objects are proxied.
MethodMapTransactionAttributeSourcenow uses now usesReflectionUtils.getAllDeclaredMethodswhich means that when something likeaddTransactionalMethod("sample.Foo.*", ...)is invoked, all the methods (including the methods onObject) are added to thetransactionAttributeMap.Then when a method from
Objectis queried on any class (i.e.MethodMapTransactionAttributeSource.getTransactionAttribute(finalizeMethod,JdbcTemplate.class)) the result is true, so every object ends up getting proxied.A complete example of the issue can be seen at https://github.com/rwinch/spring-aop-proxy-issue/blob/master/src/test/java/sample/ProxyTests.java
Affects: 5.0.6
Issue Links: