From 7d8549d8aa08bbc4f28e5965bdf30d6b0a4b3062 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Thu, 14 Nov 2019 13:47:08 -0800 Subject: [PATCH] HHH-13737 : Add debug logging --- .../src/main/java/org/hibernate/internal/SessionImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java index 48042a90ab..06791def7e 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java @@ -3348,7 +3348,13 @@ public final class SessionImpl } catch ( JDBCException e ) { if ( accessTransaction().isActive() && accessTransaction().getRollbackOnly() ) { - // assume this is the similar to the WildFly / IronJacamar "feature" described under HHH-12472 + // Assume this is the similar to the WildFly / IronJacamar "feature" described under HHH-12472. + // Just log the exception and return null. + if ( log.isDebugEnabled() ) { + log.debug( "JDBCException was thrown for a transaction marked for rollback; " + + "this is probably due to IronJacamar failing fast after " + + "transaction was marked for rollback.", e ); + } return null; } else {