|
I found another way to run the two scenarios suggested in your comments. Instead of using JPA, an alternative CustomerDAO implementation uses plain JDBC.
For scenario 1), the jdbc implementation simply performs the update within a transaction. When the update fails, an exception is raised which traces back to the cause: see jdbc_stacktrace.txt
For scenario 2), the CustomerDAO implementation:
-
starts a transaction
-
registers a synchronization
-
attempts to commit
-
the synchronisation marks the transaction for rollback only
The exception raised nevertheless still traces back to the cause: see jdbc_mark_rollback_only_stacktrace.txt
Please let me know if anything is not clear.
|