Reproduced in
flozano/spring-framework-issues@bbc160d
We use meta-annotations for using different transaction managers in different areas of the app.
During the upgrade to 5.2.0.RELEASE, we found that the wrong transaction manager was being used in many cases.
I haven't investigated deep enough, but I have put together a reproducing project that works well in Spring 5.1.9 but fails in 5.2.0.
What I have observed is that the behaviour of AnnotatedElementUtils#findMergedAnnotationAttributes is different than it was for 5.1.9.RELEASE when @AliasFor appears, basically not propagating the value that I set in the meta-annotations to @Transactional.
What I have is:
@Transactional
@Retention(RetentionPolicy.RUNTIME)
public @interface MyTransactional {
@AliasFor(annotation = Transactional.class, attribute = "value")
String value() default "defaultTransactionManager";
@AliasFor(annotation = Transactional.class, attribute = "isolation")
Isolation isolation() default Isolation.DEFAULT;
}
and
@MyTransactional(value = "anotherTransactionManager")
@Retention(RetentionPolicy.RUNTIME)
public @interface AnotherMyTransactional {
}
and when I try to use @AnotherMyTransactional, findMergedAnnotationAttributes gets an empty value for value field (transaction manager qualifier) , whereas in 5.1.9.RELEASE it obtains the right one.
Reproduced in
flozano/spring-framework-issues@bbc160d
We use meta-annotations for using different transaction managers in different areas of the app.
During the upgrade to 5.2.0.RELEASE, we found that the wrong transaction manager was being used in many cases.
I haven't investigated deep enough, but I have put together a reproducing project that works well in Spring 5.1.9 but fails in 5.2.0.
What I have observed is that the behaviour of
AnnotatedElementUtils#findMergedAnnotationAttributesis different than it was for 5.1.9.RELEASE when@AliasForappears, basically not propagating the value that I set in the meta-annotations to@Transactional.What I have is:
and
and when I try to use
@AnotherMyTransactional,findMergedAnnotationAttributesgets an empty value forvaluefield (transaction manager qualifier) , whereas in 5.1.9.RELEASE it obtains the right one.