Clarify rollback-on consistency between DefaultTransactionAttribute and TransactionTemplate [SPR-14994] #19560
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: backported
An issue that has been backported to maintenance branches
type: task
A general task
Milestone
Gary Russell opened SPR-14994 and commented
The
DefaultTransactionAttribute.rollbackOn()
javadoc says it is "consistent with theTransactionTemplate
's default behavior"...Since #11027, this is no longer strictly correct, in that a rollback will occur for any exception there.
Of course, as seen in that JIRA attachment, actually throwing a checked exception is a bit convoluted (reflection on a ctor that throws a checked exception), so perhaps this is ok.
However when looking at the code it appears incorrect and I had to dig back into the commit history to understand what's going on; perhaps adding a comment to the template code where we catch
Exception
(nowThrowable
since #18901) would help.Or, Juergen Hoeller, feel free to just close this if you don't think any changes are warranted.
Affects: 4.2.8, 4.3.4
Issue Links:
Referenced from: commits 953bc18, 0296c7c, 2de488e
Backported to: 4.2.9
The text was updated successfully, but these errors were encountered: