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
Currently when a @Transactional method throws an java.lang.Error the transaction is not rolled-back.
But, the java.lang.Error is an un-checked exception and such behaviour is wrong and the transaction should be rolled-back.
This is an issue that was fixed in Narayana - WildFly integration by issue: https://issues.redhat.com/browse/JBTM-3454
This issue should bring the same fix to Quarkus JTA CDI integration as well.
On JTA spec and Errors
The JTA spec does not define the behaviour precisely for @Transactional. But from other spec or other parts of JTA spec we can consider the Error should rollback the transaction.
The JTA spec says about exceptions for @Transactional annotation:
By default checked exceptions do not result in the transactional interceptor marking
the transaction for rollback and instances of RuntimeException and its subclasses do.
But from information about Synchronization at JTA spec
An unchecked exception thrown by a registered Synchronization object
causes the transaction to be aborted.
or about transaction handling withing EJB spec
all other exceptions [meant non-application-exceptions]
should "Mark the transaction for rollback."
The text was updated successfully, but these errors were encountered:
Currently when a
@Transactional
method throws anjava.lang.Error
the transaction is not rolled-back.But, the
java.lang.Error
is an un-checked exception and such behaviour is wrong and the transaction should be rolled-back.This is an issue that was fixed in Narayana - WildFly integration by issue:
https://issues.redhat.com/browse/JBTM-3454
This issue should bring the same fix to Quarkus JTA CDI integration as well.
On JTA spec and Errors
The JTA spec does not define the behaviour precisely for
@Transactional
. But from other spec or other parts of JTA spec we can consider the Error should rollback the transaction.The JTA spec says about exceptions for
@Transactional
annotation:But from information about Synchronization at JTA spec
or about transaction handling withing EJB spec
The text was updated successfully, but these errors were encountered: