From fdfcb5ddd38fc8324938a84fc9969d69433c9afe Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Wed, 30 Mar 2016 12:52:04 +0200 Subject: [PATCH] HHH-10635 - Fix EntityManager.isOpen() should respect status of Session (cherry picked from commit 2a79ebe1651d1c51176bd901d6671921497702c4) --- .../main/java/org/hibernate/jpa/internal/EntityManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/EntityManagerImpl.java b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/EntityManagerImpl.java index 3515656bdd..de3a9fb5f8 100755 --- a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/EntityManagerImpl.java +++ b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/EntityManagerImpl.java @@ -154,7 +154,7 @@ public class EntityManagerImpl extends AbstractEntityManagerImpl implements Sess checkEntityManagerFactory(); try { if ( open ) { - internalGetSession().isOpen(); //to force enlistment in tx + open = internalGetSession().isOpen(); //to force enlistment in tx } return open; }