]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5440: Add clarifying comments.
authorAron Roberts <aron@socrates.berkeley.edu>
Tue, 7 Aug 2012 21:53:00 +0000 (14:53 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Tue, 7 Aug 2012 21:53:00 +0000 (14:53 -0700)
services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java
services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java

index af66f475bb57656895865f82e312a40400bc8795..2ff40364eb7d74aa053c1bfda896634503918d2c 100644 (file)
@@ -213,8 +213,9 @@ public class ServiceMain {
      * @throws Exception \r
      */\r
     void createRequiredIndices() throws Exception {\r
-         DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME);\r
                    \r
+         // Define a set of columns (fields) and their associated\r
+         // tables, on which database indexes should always be created\r
          final String COLLECTIONSPACE_CORE_TABLE_NAME = "collectionspace_core";\r
          final String NUXEO_FULLTEXT_TABLE_NAME = "fulltext";\r
          final String NUXEO_HIERARCHY_TABLE_NAME = "hierarchy";\r
@@ -225,6 +226,10 @@ public class ServiceMain {
          indexableFields.put("jobid", NUXEO_FULLTEXT_TABLE_NAME);\r
          indexableFields.put("name", NUXEO_HIERARCHY_TABLE_NAME);\r
        \r
+         // Invoke existing post-init code to create these indexes,\r
+         // sending in the set of values above, in contrast to\r
+         // drawing these values from per-tenant configuration.\r
+         DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME);\r
          AddIndices addindices = new AddIndices();\r
          List<Field> fields = new ArrayList<Field>();\r
          for (Map.Entry<String,String> entry : indexableFields.entrySet()) {\r
index 58b76e681635c7d9cf39bcf08903aedd8e94a5c3..fc654c2eea9ec89097d3aca5110de2d15a050544 100644 (file)
@@ -74,7 +74,7 @@ import org.slf4j.LoggerFactory;
                 &lt;/s:params>\r
             &lt;/s:initHandler>\r
  *\r
- * $LastChangedRevision$4\r
+ * $LastChangedRevision$\r
  * $LastChangedDate$\r
  */\r
 public class AddIndices extends InitHandler implements IInitHandler {\r