sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject [sling-org-apache-sling-jcr-oak-server] branch master updated: SLING-7607 Move ThreadPool (Executor) handling out of OakSlingRepositoryManager
Date Sun, 22 Apr 2018 12:20:13 GMT
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 <olli@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.

Mime
View raw message