sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1649342 - /sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java
Date Sun, 04 Jan 2015 14:11:37 GMT
Author: chetanm
Date: Sun Jan  4 14:11:36 2015
New Revision: 1649342

URL: http://svn.apache.org/r1649342
Log:
SLING-3479 - Upgrade to Oak 1.0

Rely on pre registered LuceneIndexProvider and do not register one explicitly. Expose the
NodeAggregator as OSGi service such that it gets picked up by the LuceneIndexProvider

Modified:
    sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java

Modified: sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java?rev=1649342&r1=1649341&r2=1649342&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java
(original)
+++ sling/trunk/bundles/jcr/oak-server/src/main/java/org/apache/sling/oak/server/OakSlingRepositoryManager.java
Sun Jan  4 14:11:36 2015
@@ -204,6 +204,8 @@ public class OakSlingRepositoryManager e
     @Reference(policy = STATIC, policyOption = GREEDY)
     private SecurityProvider securityProvider = null;
 
+    private ServiceRegistration nodeAggregator;
+
     @Override
     protected Repository acquireRepository() {
         this.adminUserName = securityProvider.getConfiguration(UserConfiguration.class).getParameters().getConfigValue(
@@ -238,15 +240,6 @@ public class OakSlingRepositoryManager e
         // index stuff
         .with(indexProvider)
         .with(indexEditorProvider)
-//        .with(new PropertyIndexEditorProvider())
-
-//        .with(new PropertyIndexProvider())
-//        .with(new NodeTypeIndexProvider())
-
-//        .with(new LuceneIndexEditorProvider())
-        .with(AggregateIndexProvider.wrap(new LuceneIndexProvider()
-                .with(getNodeAggregator())))
-
         .with(getDefaultWorkspace())
         .withAsyncIndexing()
         .with(whiteboard)
@@ -337,6 +330,9 @@ public class OakSlingRepositoryManager e
         this.observationQueueLength = getObservationQueueLength(componentContext);
         this.commitRateLimiter = getCommitRateLimiter(componentContext);
         this.threadPool = threadPoolManager.get("oak-observation");
+        this.nodeAggregator = componentContext.getBundleContext()
+                .registerService(NodeAggregator.class.getName(), getNodeAggregator(), null);
+
         super.start(componentContext.getBundleContext(), defaultWorkspace, disableLoginAdministrative);
     }
 
@@ -348,6 +344,7 @@ public class OakSlingRepositoryManager e
         this.namespaceMappers = null;
         this.threadPoolManager.release(this.threadPool);
         this.threadPool = null;
+        this.nodeAggregator.unregister();
         this.tearDown();
     }
 



Mime
View raw message