cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Introducing constants in WorkQueueManagerImpl, patch from Benedikt Waldvogel applied, This closes #145
Date Fri, 01 Jul 2016 13:14:02 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 42db399ac -> 7e751b2f6


Introducing constants in WorkQueueManagerImpl, patch from Benedikt Waldvogel applied, This
closes #145


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7e751b2f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7e751b2f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7e751b2f

Branch: refs/heads/3.1.x-fixes
Commit: 7e751b2f6de15c0d12591b58f6a85519ba5d9bcb
Parents: 42db399
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Jul 1 14:12:30 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Jul 1 14:13:49 2016 +0100

----------------------------------------------------------------------
 .../cxf/bus/managers/WorkQueueManagerImpl.java       | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7e751b2f/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java b/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java
index 9121c45..10420be 100644
--- a/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java
+++ b/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java
@@ -42,6 +42,9 @@ import org.apache.cxf.workqueue.WorkQueueManager;
 @NoJSR250Annotations(unlessNull = "bus")
 public class WorkQueueManagerImpl implements WorkQueueManager {
 
+    public static final String DEFAULT_QUEUE_NAME = "default";
+    public static final String DEFAULT_WORKQUEUE_BEAN_NAME = "cxf.default.workqueue";
+
     private static final Logger LOG =
         LogUtils.getL7dLogger(WorkQueueManagerImpl.class);
 
@@ -85,11 +88,11 @@ public class WorkQueueManagerImpl implements WorkQueueManager {
                 }
             }
             
-            if (!namedQueues.containsKey("default")) {
+            if (!namedQueues.containsKey(DEFAULT_QUEUE_NAME)) {
                 AutomaticWorkQueue defaultQueue 
-                    = locator.getBeanOfType("cxf.default.workqueue", AutomaticWorkQueue.class);
+                    = locator.getBeanOfType(DEFAULT_WORKQUEUE_BEAN_NAME, AutomaticWorkQueue.class);
                 if (defaultQueue != null) {
-                    addNamedWorkQueue("default", defaultQueue);
+                    addNamedWorkQueue(DEFAULT_QUEUE_NAME, defaultQueue);
                 }
             }
             
@@ -99,7 +102,7 @@ public class WorkQueueManagerImpl implements WorkQueueManager {
     }
 
     public synchronized AutomaticWorkQueue getAutomaticWorkQueue() {
-        AutomaticWorkQueue defaultQueue = getNamedWorkQueue("default");
+        AutomaticWorkQueue defaultQueue = getNamedWorkQueue(DEFAULT_QUEUE_NAME);
         if (defaultQueue == null) {
             defaultQueue = createAutomaticWorkQueue();
         }
@@ -194,8 +197,8 @@ public class WorkQueueManagerImpl implements WorkQueueManager {
     }
     
     private AutomaticWorkQueue createAutomaticWorkQueue() {        
-        AutomaticWorkQueue q = new AutomaticWorkQueueImpl("default");
-        addNamedWorkQueue("default", q);
+        AutomaticWorkQueue q = new AutomaticWorkQueueImpl(DEFAULT_QUEUE_NAME);
+        addNamedWorkQueue(DEFAULT_QUEUE_NAME, q);
         return q;
     }
     


Mime
View raw message