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
Support type-safe transaction rollback rules #28098
Comments
This is by design and was originally implemented using You can see examples of this in the reference docs. <tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="get*" read-only="true" rollback-for="NoProductInStockException"/>
<tx:method name="*"/>
</tx:attributes>
</tx:advice> With your proposal to use Please take note of the Javadoc for
Similar documentation exists for the The Javadoc for the
However, that last sentence is not honored in the current implementation, since the type information (supplied via the |
Correction to my previous statement. The Javadoc for the However, the documentation for rollback rules can be improved to warn that unintentional matches may arise if the name of a thrown exception contains the name of a registered exception type. I am therefore repurposing this issue to improve the documentation. |
I think this rollback rule is fallible and needs more precise matching rules。 |
I agree with you. I've raised #28125 to improve the documentation for And we'll use this issue to improve the behavior in Specifically:
|
Source code in question:
test code:
The text was updated successfully, but these errors were encountered: