From c5e91f6bda0e906db8b229e383c142e2f1c1473c Mon Sep 17 00:00:00 2001 From: Emmanuel Bernard Date: Fri, 8 Jul 2011 01:40:53 +0200 Subject: [PATCH] HHH-6419 Let SessionImplementor#getFactory pass even out of Tx in TL bound sessions --- .../hibernate/context/internal/ThreadLocalSessionContext.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hibernate-core/src/main/java/org/hibernate/context/internal/ThreadLocalSessionContext.java b/hibernate-core/src/main/java/org/hibernate/context/internal/ThreadLocalSessionContext.java index 006979a8c3..ea61b6ea02 100644 --- a/hibernate-core/src/main/java/org/hibernate/context/internal/ThreadLocalSessionContext.java +++ b/hibernate-core/src/main/java/org/hibernate/context/internal/ThreadLocalSessionContext.java @@ -333,6 +333,7 @@ public class ThreadLocalSessionContext implements CurrentSessionContext { || "getTransaction".equals( method.getName() ) || "isTransactionInProgress".equals( method.getName() ) || "setFlushMode".equals( method.getName() ) + || "getFactory".equals( method.getName() ) //from SessionImplementor || "getSessionFactory".equals( method.getName() ) ) { LOG.trace("Allowing method [" + method.getName() + "] in non-transacted context"); }