You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/10/13 20:04:33 UTC
git commit: Moved index create to be on new application entity manager
Repository: incubator-usergrid
Updated Branches:
refs/heads/two-dot-o cefe795d5 -> 265a258d9
Moved index create to be on new application entity manager
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/265a258d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/265a258d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/265a258d
Branch: refs/heads/two-dot-o
Commit: 265a258d9e01158b69ce0e5f90b4d63b406ad945
Parents: cefe795
Author: Todd Nine <to...@apache.org>
Authored: Mon Oct 13 12:04:27 2014 -0600
Committer: Todd Nine <to...@apache.org>
Committed: Mon Oct 13 12:04:27 2014 -0600
----------------------------------------------------------------------
.../usergrid/corepersistence/CpEntityManagerFactory.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/265a258d/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index 1048505..5213bc2 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@ -245,10 +245,6 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
EntityManager em = getEntityManager(SYSTEM_APP_ID);
- //create our ES index since we're initializing this application
- em.createIndex();
-
-
final String appName = buildAppName( organizationName, name );
// check for pre-existing application
@@ -287,6 +283,10 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
}
properties.put( PROPERTY_NAME, appName );
EntityManager appEm = getEntityManager( applicationId );
+
+ //create our ES index since we're initializing this application
+ appEm.createIndex();
+
appEm.create( applicationId, TYPE_APPLICATION, properties );
appEm.resetRoles();
appEm.refreshIndex();