You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by gp...@apache.org on 2019/05/14 22:34:19 UTC
[deltaspike] branch master updated: DELTASPIKE-1378 fixed
initialization of EntityManagerRefLookup
This is an automated email from the ASF dual-hosted git repository.
gpetracek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/deltaspike.git
The following commit(s) were added to refs/heads/master by this push:
new eb6ae03 DELTASPIKE-1378 fixed initialization of EntityManagerRefLookup
eb6ae03 is described below
commit eb6ae03a3286232ad0606d2f2bf6f4eb82607ab6
Author: gpetracek <gp...@apache.org>
AuthorDate: Wed May 15 00:31:58 2019 +0200
DELTASPIKE-1378 fixed initialization of EntityManagerRefLookup
---
.../deltaspike/jpa/impl/entitymanager/EntityManagerRefLookup.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/EntityManagerRefLookup.java b/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/EntityManagerRefLookup.java
index 9b1c96e..7d048ed 100644
--- a/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/EntityManagerRefLookup.java
+++ b/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/EntityManagerRefLookup.java
@@ -54,8 +54,6 @@ public class EntityManagerRefLookup
// switch into paranoia mode
if (this.globalEntityManagerInitialized == null)
{
- this.globalEntityManagerInitialized = true;
-
BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();
Set<Bean<?>> beans = beanManager.getBeans(EntityManager.class);
Bean<?> bean = beanManager.resolve(beans);
@@ -72,6 +70,8 @@ public class EntityManagerRefLookup
EntityManager.class,
beanManager.createCreationalContext(bean));
}
+
+ this.globalEntityManagerInitialized = true;
}
}