From dd7b01ccc8a55e761f1edd604ef4c07146626648 Mon Sep 17 00:00:00 2001 From: Emmanuel Bernard Date: Tue, 5 Jan 2010 10:46:13 +0000 Subject: [PATCH] HHH-4749 Don't block calls to getListeners on SessionImplementor when using thread scoped sessions git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18408 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../java/org/hibernate/context/ThreadLocalSessionContext.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/hibernate/context/ThreadLocalSessionContext.java b/core/src/main/java/org/hibernate/context/ThreadLocalSessionContext.java index 442112d828..594c8e8679 100644 --- a/core/src/main/java/org/hibernate/context/ThreadLocalSessionContext.java +++ b/core/src/main/java/org/hibernate/context/ThreadLocalSessionContext.java @@ -311,7 +311,9 @@ public class ThreadLocalSessionContext implements CurrentSessionContext { || "equals".equals( method.getName() ) || "hashCode".equals( method.getName() ) || "getStatistics".equals( method.getName() ) - || "isOpen".equals( method.getName() ) ) { + || "isOpen".equals( method.getName() ) + || "getListeners".equals( method.getName() ) //useful for HSearch in particular + ) { // allow these to go through the the real session no matter what } else if ( !realSession.isOpen() ) {