cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1508377 - in /cxf/trunk: rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java
Date Tue, 30 Jul 2013 10:24:18 GMT
Author: sergeyb
Date: Tue Jul 30 10:24:18 2013
New Revision: 1508377

URL: http://svn.apache.org/r1508377
Log:
Updating LocalTransport to check message contextual properties when deciding if it is the
direct dispatch or not, so that this property can be used by injectable clients

Modified:
    cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java

Modified: cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java?rev=1508377&r1=1508376&r2=1508377&view=diff
==============================================================================
--- cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
(original)
+++ cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
Tue Jul 30 10:24:18 2013
@@ -35,6 +35,7 @@ import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.transport.AbstractConduit;
 import org.apache.cxf.workqueue.SynchronousExecutor;
 
@@ -58,7 +59,7 @@ public class LocalConduit extends Abstra
     }
     
     public void prepare(final Message message) throws IOException {
-        if (!Boolean.TRUE.equals(message.get(DIRECT_DISPATCH))) {
+        if (!MessageUtils.isTrue(message.getContextualProperty(DIRECT_DISPATCH))) {
             dispatchViaPipe(message);
         } else {
             // prepare the stream here
@@ -72,7 +73,7 @@ public class LocalConduit extends Abstra
 
     @Override
     public void close(Message message) throws IOException {
-        if (Boolean.TRUE.equals(message.get(DIRECT_DISPATCH))
+        if (MessageUtils.isTrue(message.getContextualProperty(DIRECT_DISPATCH))
             && !Boolean.TRUE.equals(message.get(Message.INBOUND_MESSAGE))) {
             dispatchDirect(message);
         } 

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java?rev=1508377&r1=1508376&r2=1508377&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java
Tue Jul 30 10:24:18 2013
@@ -74,7 +74,7 @@ public class JAXRSLocalTransportTest ext
         BookStore localProxy = 
             JAXRSClientFactory.create("local://books", BookStore.class);
         
-        WebClient.getConfig(localProxy).getRequestContext().put(LocalConduit.DIRECT_DISPATCH,
Boolean.TRUE);
+        WebClient.getConfig(localProxy).getRequestContext().put(LocalConduit.DIRECT_DISPATCH,
"true");
         
         Book bookSubProxy = localProxy.getBookSubResource("123");
         Book book = bookSubProxy.retrieveState();



Mime
View raw message