cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [cxf] branch master updated: [CXF-7556] Trying to use a json subscriber by default to avoid losing data for Flowable/Flux
Date Wed, 27 Dec 2017 11:39:19 GMT
This is an automated email from the ASF dual-hosted git repository.

sergeyb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 3bbcfd5  [CXF-7556] Trying to use a json subscriber by default to avoid losing data
for Flowable/Flux
3bbcfd5 is described below

commit 3bbcfd5d6caa343d664aa23326ff87cdb1b85d99
Author: Sergey Beryozkin <sberyozkin@gmail.com>
AuthorDate: Wed Dec 27 11:39:05 2017 +0000

    [CXF-7556] Trying to use a json subscriber by default to avoid losing data for Flowable/Flux
---
 .../cxf/jaxrs/reactivestreams/server/AbstractReactiveInvoker.java | 2 +-
 .../java/org/apache/cxf/systest/jaxrs/reactor/ReactorServer.java  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/rt/rs/extensions/reactivestreams/src/main/java/org/apache/cxf/jaxrs/reactivestreams/server/AbstractReactiveInvoker.java
b/rt/rs/extensions/reactivestreams/src/main/java/org/apache/cxf/jaxrs/reactivestreams/server/AbstractReactiveInvoker.java
index e82166b..ee939fd 100644
--- a/rt/rs/extensions/reactivestreams/src/main/java/org/apache/cxf/jaxrs/reactivestreams/server/AbstractReactiveInvoker.java
+++ b/rt/rs/extensions/reactivestreams/src/main/java/org/apache/cxf/jaxrs/reactivestreams/server/AbstractReactiveInvoker.java
@@ -30,7 +30,7 @@ import org.reactivestreams.Publisher;
 
 
 public abstract class AbstractReactiveInvoker extends JAXRSInvoker {
-    private boolean useStreamingSubscriberIfPossible;
+    private boolean useStreamingSubscriberIfPossible = true;
     
     
     protected Object handleThrowable(AsyncResponseImpl asyncResponse, Throwable t) {
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactor/ReactorServer.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactor/ReactorServer.java
index c056dbc..1a8fe27 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactor/ReactorServer.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/reactor/ReactorServer.java
@@ -42,7 +42,9 @@ public class ReactorServer extends AbstractBusTestServerBase {
         // Make sure default JSONProvider is not loaded
         bus.setProperty("skip.default.json.provider.registration", true);
         JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
-        sf.setInvoker(new ReactorInvoker());
+        ReactorInvoker invoker = new ReactorInvoker();
+        invoker.setUseStreamingSubscriberIfPossible(false);
+        sf.setInvoker(invoker);
         sf.setProvider(new JacksonJsonProvider());
         StreamingResponseProvider<HelloWorldBean> streamProvider = new StreamingResponseProvider<HelloWorldBean>();
         streamProvider.setProduceMediaTypes(Collections.singletonList("application/json"));
@@ -57,9 +59,7 @@ public class ReactorServer extends AbstractBusTestServerBase {
         server1 = sf.create();
         
         JAXRSServerFactoryBean sf2 = new JAXRSServerFactoryBean();
-        ReactorInvoker invoker2 = new ReactorInvoker();
-        invoker2.setUseStreamingSubscriberIfPossible(true);
-        sf2.setInvoker(invoker2);
+        sf2.setInvoker(new ReactorInvoker());
         StreamingResponseProvider<HelloWorldBean> streamProvider2 = new StreamingResponseProvider<HelloWorldBean>();
         streamProvider2.setProduceMediaTypes(Collections.singletonList("application/json"));
         sf2.setProvider(streamProvider2);

-- 
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <commits@cxf.apache.org>'].

Mime
View raw message