You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TransactionInterceptor avoids reflective method search for method identification
As of Spring 3.0.4, we were trying to expose the target method signature as transaction name. Unfortunately, the algorithm called the ClassUtils.getMostSpecificMethod helper method which performs a quite expensive reflective search. As of this commit, we're simply concatenating the target class name with the method name, accepting the use of the concrete target class (which is arguably more meaningful for monitoring anyway) even when the method implementation actually sits on a base class.
Issue: SPR-9802
Copy file name to clipboardExpand all lines: org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java
Copy file name to clipboardExpand all lines: org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSource.java
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2010 the original author or authors.
2
+
* Copyright 2002-2012 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -19,23 +19,25 @@
19
19
importjava.lang.reflect.Method;
20
20
21
21
/**
22
-
* Interface used by TransactionInterceptor. Implementations know
23
-
* how to source transaction attributes, whether from configuration,
24
-
* metadata attributes at source level, or anywhere else.
22
+
* Strategy interface used by {@link TransactionInterceptor} for metadata retrieval.
23
+
*
24
+
* <p>Implementations know how to source transaction attributes, whether from configuration,
25
+
* metadata attributes at source level (such as Java 5 annotations), or anywhere else.
Copy file name to clipboardExpand all lines: org.springframework.transaction/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2010 the original author or authors.
2
+
* Copyright 2002-2012 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
0 commit comments