You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2013/07/30 12:29:26 UTC
svn commit: r1508378 - in /cxf/branches/2.7.x-fixes: ./
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
Author: sergeyb
Date: Tue Jul 30 10:29:25 2013
New Revision: 1508378
URL: http://svn.apache.org/r1508378
Log:
Merged revisions 1508377 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1508377 | sergeyb | 2013-07-30 11:24:18 +0100 (Tue, 30 Jul 2013) | 1 line
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/branches/2.7.x-fixes/ (props changed)
cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java
Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Merged /cxf/trunk:r1508377
Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java?rev=1508378&r1=1508377&r2=1508378&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java (original)
+++ cxf/branches/2.7.x-fixes/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java Tue Jul 30 10:29:25 2013
@@ -34,6 +34,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;
@@ -57,7 +58,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
@@ -71,7 +72,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/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java?rev=1508378&r1=1508377&r2=1508378&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java (original)
+++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSLocalTransportTest.java Tue Jul 30 10:29:25 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();