From: Aron Roberts Date: Tue, 7 Aug 2012 21:53:00 +0000 (-0700) Subject: CSPACE-5440: Add clarifying comments. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=abf10f76ef802fc8460d6f92aa437b0d97968c6c;p=tmp%2Fjakarta-migration.git CSPACE-5440: Add clarifying comments. --- diff --git a/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java b/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java index af66f475b..2ff40364e 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java +++ b/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java @@ -213,8 +213,9 @@ public class ServiceMain { * @throws Exception */ void createRequiredIndices() throws Exception { - DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME); + // Define a set of columns (fields) and their associated + // tables, on which database indexes should always be created final String COLLECTIONSPACE_CORE_TABLE_NAME = "collectionspace_core"; final String NUXEO_FULLTEXT_TABLE_NAME = "fulltext"; final String NUXEO_HIERARCHY_TABLE_NAME = "hierarchy"; @@ -225,6 +226,10 @@ public class ServiceMain { indexableFields.put("jobid", NUXEO_FULLTEXT_TABLE_NAME); indexableFields.put("name", NUXEO_HIERARCHY_TABLE_NAME); + // Invoke existing post-init code to create these indexes, + // sending in the set of values above, in contrast to + // drawing these values from per-tenant configuration. + DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME); AddIndices addindices = new AddIndices(); List fields = new ArrayList(); for (Map.Entry entry : indexableFields.entrySet()) { diff --git a/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java b/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java index 58b76e681..fc654c2ee 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java +++ b/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java @@ -74,7 +74,7 @@ import org.slf4j.LoggerFactory; </s:params> </s:initHandler> * - * $LastChangedRevision$4 + * $LastChangedRevision$ * $LastChangedDate$ */ public class AddIndices extends InitHandler implements IInitHandler {