From 65f420efec58a849e853b3caf811d0cc143a03a3 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Tue, 4 Apr 2017 14:01:27 +0100 Subject: [PATCH] HHH-11602 - Session close counter statistic not updated when using Hibernate in JPA mode --- .../main/java/org/hibernate/internal/SessionImpl.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 61402f01b7..206e147f3f 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java @@ -415,12 +415,11 @@ public final class SessionImpl } } else { - super.close(); - - if ( getFactory().getStatistics().isStatisticsEnabled() ) { - getFactory().getStatistics().closeSession(); - } + } + + if ( getFactory().getStatistics().isStatisticsEnabled() ) { + getFactory().getStatistics().closeSession(); } }