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

Clarify ReactiveTransactionManager exception declarations #30817

Closed
jhoeller opened this issue Jul 5, 2023 · 0 comments
Closed

Clarify ReactiveTransactionManager exception declarations #30817

jhoeller opened this issue Jul 5, 2023 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented Jul 5, 2023

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.

@jhoeller jhoeller added in: data Issues in data modules (jdbc, orm, oxm, tx) type: documentation A documentation task labels Jul 5, 2023
@jhoeller jhoeller added this to the 6.0.11 milestone Jul 5, 2023
@jhoeller jhoeller self-assigned this Jul 5, 2023
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.3.x labels Jul 5, 2023
jhoeller added a commit that referenced this issue Jul 5, 2023
Avoid misleading "throws TransactionException" declarations but preserve javadoc "@throws" notes for specific exceptions (with reactive propagation semantics).

Closes gh-30817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

1 participant