You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JTA specification it's not clear about behaviour of CDI interceptor in case of unchecked exceptions. That part of the spec talks explicitly about RuntimeException to cause the transaction to be marked for rollback. But the spec should use term unchecked exception instead.
The spec says now
By default checked exceptions do not result in the transactional interceptor marking the transaction for rollback and instances of RuntimeException and its subclasses do.
The part about Synchronization is correct as it says
An unchecked exception thrown by a registered Synchronization object causes the transaction to be aborted.
The text about CDI interceptor should be aligned to use term unchecked exception instead of RuntimeException.
A note from the Java Language Specification, version 11, chapter 11.1.1:
The unchecked exception classes are the run-time exception classes and the error classes.
The checked exception classes are all exception classes other than the unchecked exception classes. That is, the checked exception classes are Throwable and all its subclasses other than RuntimeException and its subclasses and Error and its subclasses.
The text was updated successfully, but these errors were encountered:
ochaloup
added a commit
to ochaloup/jta-api
that referenced
this issue
Apr 22, 2021
The JTA specification it's not clear about behaviour of CDI interceptor in case of unchecked exceptions. That part of the spec talks explicitly about
RuntimeException
to cause the transaction to be marked for rollback. But the spec should use termunchecked exception
instead.The spec says now
The part about
Synchronization
is correct as it saysThe text about CDI interceptor should be aligned to use term
unchecked exception
instead ofRuntimeException
.A note from the Java Language Specification, version 11, chapter 11.1.1:
The text was updated successfully, but these errors were encountered: