Make AbstractFallbackTransactionAttributeSource.computeTransactionAttribute(…) protected [SPR-13246] #17837
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
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
andAnnotationTransactionAttributeSource
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:
@Transactional
not being applied to query methodsReferenced from: commits a8fb551, 35b2575
Backported to: 4.1.8
The text was updated successfully, but these errors were encountered: