You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2018/04/22 12:20:13 UTC

[sling-org-apache-sling-jcr-oak-server] branch master updated: SLING-7607 Move ThreadPool (Executor) handling out of OakSlingRepositoryManager

This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-oak-server.git


The following commit(s) were added to refs/heads/master by this push:
     new cedef04  SLING-7607 Move ThreadPool (Executor) handling out of OakSlingRepositoryManager
cedef04 is described below

commit cedef0425e4b1ebc1200263a069d7fd7fc519b78
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sun Apr 22 12:53:19 2018 +0200

    SLING-7607 Move ThreadPool (Executor) handling out of OakSlingRepositoryManager
    
    register ThreadPool service with name
---
 .../jcr/oak/server/internal/DefaultThreadPoolRegistrar.java      | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/jcr/oak/server/internal/DefaultThreadPoolRegistrar.java b/src/main/java/org/apache/sling/jcr/oak/server/internal/DefaultThreadPoolRegistrar.java
index 2219538..48b26e5 100644
--- a/src/main/java/org/apache/sling/jcr/oak/server/internal/DefaultThreadPoolRegistrar.java
+++ b/src/main/java/org/apache/sling/jcr/oak/server/internal/DefaultThreadPoolRegistrar.java
@@ -18,6 +18,9 @@
  */
 package org.apache.sling.jcr.oak.server.internal;
 
+import java.util.Dictionary;
+import java.util.Hashtable;
+
 import org.apache.sling.commons.threads.ThreadPool;
 import org.apache.sling.commons.threads.ThreadPoolManager;
 import org.osgi.framework.BundleContext;
@@ -44,8 +47,10 @@ public class DefaultThreadPoolRegistrar {
 
     @Activate
     private void activate(final BundleContext bundleContext) {
-        threadPool = threadPoolManager.get(null);
-        serviceRegistration = bundleContext.registerService(ThreadPool.class, threadPool, null);
+        threadPool = threadPoolManager.get(ThreadPoolManager.DEFAULT_THREADPOOL_NAME);
+        final Dictionary<String, String> properties = new Hashtable<>();
+        properties.put("name", ThreadPoolManager.DEFAULT_THREADPOOL_NAME);
+        serviceRegistration = bundleContext.registerService(ThreadPool.class, threadPool, properties);
     }
 
     @Deactivate

-- 
To stop receiving notification emails like this one, please contact
olli@apache.org.