Skip to content

Clarify ReactiveTransactionManager exception declarations #30817

@jhoeller

Description

@jhoeller

By design, ReactiveTransactionManager uses javadoc @throws clauses for indicating the exceptions that it propagates through the reactive pipeline returned from its methods. Unfortunately it also inherited Java method signature throws TransactionException declarations from PlatformTransactionManager which do not add anything to the signature here since TransactionException is a RuntimeException, and those declarations actually do not give a correct indication since the ReactiveTransactionManager methods are not expected to actually throw that exception type in a traditional sense. As a consequence, we'll drop those throws declarations from the method signature but keep the javadoc @throws indications around, in the ReactiveTransactionManager interface as well as the AbstractReactiveTransactionManager base class.

Also, along the lines of #30802, R2dbcTransactionManager actually propagates R2dbcException (a DataAccessException subclass) from commit/rollback which we should support in the ReactiveTransactionManager javadoc as well.

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchestype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions