Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AbstractFallbackTransactionAttributeSource.computeTransactionAttribute(…) protected [SPR-13246] #17837

Closed
spring-projects-issues opened this issue Jul 17, 2015 · 0 comments
Assignees
Labels
in: data status: backported type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jul 17, 2015

Oliver Drotbohm opened SPR-13246 and commented

Spring Data needs to customize the annotation attribute lookup algorithm implemented in AbstractFallbackTransactionAttributeSource.computeTransactionAttribute(…) to basically flip around the preference of annotations to the ones declared on interfaces. This is to make sure users can override the default transaction settings shipped with implementation classes on the user-declared repository interfaces.

Currently we have local copies of AbstractFallbackTransactionAttributeSource and AnnotationTransactionAttributeSource to accommodate this scenario. This unfortunately lead to the fact that we didn't catch the change to [support JTA 1.2's @Transactional|DATACMNS-732].

So far, this has worked to the repositories accidentally being wrapped in a standard Spring transaction proxy and thus the standard implementation kicking in, which was a bug in itself, fixed for DATACMNS-715. This has now basically unveiled the missing support for JTA 1.2 in the Spring Data transaction implementation.

To avoid theses kinds of errors in the future, it would be helpful not having to copy the classes and just override computeTransactionAttribute(…) selectively to benefit from future fixes to the surrounding code directly.


Affects: 4.1.7, 4.2 RC3

Issue Links:

  • DATACMNS-732 JTA 1.2's @Transactional not being applied to query methods

Referenced from: commits a8fb551, 35b2575

Backported to: 4.1.8

@spring-projects-issues spring-projects-issues added in: data status: backported type: enhancement labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.2 GA milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data status: backported type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants