cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7085] Checking the preconfigured ScheduledExecutorService
Date Tue, 11 Jul 2017 11:08:23 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 706eacc5a -> cfdd0d36c


[CXF-7085] Checking the preconfigured ScheduledExecutorService


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

Branch: refs/heads/master
Commit: cfdd0d36c31d119d5846ccfdd623ab072c8a7682
Parents: 706eacc
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Jul 11 12:08:07 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Jul 11 12:08:07 2017 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/jaxrs/sse/client/SseEventSourceImpl.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/cfdd0d36/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/client/SseEventSourceImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/client/SseEventSourceImpl.java
b/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/client/SseEventSourceImpl.java
index fe5eae7..c932a60 100644
--- a/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/client/SseEventSourceImpl.java
+++ b/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/client/SseEventSourceImpl.java
@@ -160,7 +160,12 @@ public class SseEventSourceImpl implements SseEventSource {
         }
 
         // Create the executor for scheduling the reconnect tasks 
-        executor = Executors.newSingleThreadScheduledExecutor();
+        executor = 
+            (ScheduledExecutorService)target.getConfiguration().getProperty("scheduledExecutorService");
+        if (executor == null) {
+            executor = Executors.newSingleThreadScheduledExecutor();    
+        }
+        
         
         final Object lastEventId = target.getConfiguration().getProperty(HttpHeaders.LAST_EVENT_ID_HEADER);
         connect(lastEventId != null ? lastEventId.toString() : null);


Mime
View raw message