Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Complete
-
Affects Version/s: 5.0.6
-
Component/s: Core:AOP
-
Labels:
-
Last commented by a User:true
Description
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
Attachments
Issue Links
- relates to
-
SPR-16723 AspectJ execution pointcut does not detect methods in superinterface anymore
-
- Closed
-