cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r941164 - in /cxf/branches/2.2.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/endpoint/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/transports/http/src/main/java/org/apache/cxf/transport/http/
Date Wed, 05 May 2010 06:33:56 GMT
Author: dkulp
Date: Wed May  5 06:33:56 2010
New Revision: 941164

URL: http://svn.apache.org/viewvc?rev=941164&view=rev
Log:
Merged revisions 941159 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r941159 | dkulp | 2010-05-05 02:27:41 -0400 (Wed, 05 May 2010) | 2 lines
  
  [CXF-2792] Make sure custom set executor gets passed into conduit and
  used
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=941164&r1=941163&r2=941164&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
Wed May  5 06:33:56 2010
@@ -773,13 +773,20 @@ public class ClientImpl
         if (exchange.isSynchronous() || executor == null) {
             exchange.put(MessageObserver.class, this);
         } else {
+            exchange.put(Executor.class, executor);
             exchange.put(MessageObserver.class, new MessageObserver() {
                 public void onMessage(final Message message) {
-                    executor.execute(new Runnable() {
-                        public void run() {
-                            ClientImpl.this.onMessage(message);
-                        }
-                    });
+                    if (!message.getExchange()
+                        .containsKey(Executor.class.getName() + ".USING_SPECIFIED")) {
+                        
+                        executor.execute(new Runnable() {
+                            public void run() {
+                                ClientImpl.this.onMessage(message);
+                            }
+                        });
+                    } else {
+                        ClientImpl.this.onMessage(message);
+                    }
                 }
             });
         }

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=941164&r1=941163&r2=941164&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
Wed May  5 06:33:56 2010
@@ -454,13 +454,15 @@ public class ServiceImpl extends Service
         configureObject(service);
                 
         // Configure the JaxWsEndpoitnImpl
-        JaxWsEndpointImpl jaxwsEndpoint = (JaxWsEndpointImpl) ClientProxy.getClient(obj).getEndpoint();
+        Client client = ClientProxy.getClient(obj);
+        client.getEndpoint().setExecutor(executor);
+        client.setExecutor(executor);
+        JaxWsEndpointImpl jaxwsEndpoint = (JaxWsEndpointImpl) client.getEndpoint();
         configureObject(jaxwsEndpoint);  
         List<Handler> hc = jaxwsEndpoint.getJaxwsBinding().getHandlerChain();
         
         hc.addAll(handlerResolver.getHandlerChain(portInfos.get(portName)));
         jaxwsEndpoint.getJaxwsBinding().setHandlerChain(hc);
-
         LOG.log(Level.FINE, "created proxy", obj);
 
         ports.add(portName);

Modified: cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=941164&r1=941163&r2=941164&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Wed May  5 06:33:56 2010
@@ -39,6 +39,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executor;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -78,7 +79,6 @@ import org.apache.cxf.transport.https.Ce
 import org.apache.cxf.transport.https.CertConstraintsJaxBUtils;
 import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
 import org.apache.cxf.version.Version;
-import org.apache.cxf.workqueue.AutomaticWorkQueue;
 import org.apache.cxf.workqueue.WorkQueueManager;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.policy.Assertor;
@@ -2144,13 +2144,19 @@ public class HTTPConduit 
                         }
                     }
                 };
-                WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
-                    .getExtension(WorkQueueManager.class);
-                AutomaticWorkQueue queue = mgr.getNamedWorkQueue("http-conduit");
-                if (queue == null) {
-                    queue = mgr.getAutomaticWorkQueue();
+                Executor ex = outMessage.getExchange().get(Executor.class);
+                if (ex == null) {
+                    WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
+                        .getExtension(WorkQueueManager.class);
+                    ex = mgr.getNamedWorkQueue("http-conduit");
+                    if (ex == null) {
+                        ex = mgr.getAutomaticWorkQueue();
+                    }
+                } else {
+                    outMessage.getExchange().put(Executor.class.getName() 
+                                                 + ".USING_SPECIFIED", Boolean.TRUE);
                 }
-                queue.execute(runnable);
+                ex.execute(runnable);
             }
         }
         protected void handleResponseInternal() throws IOException {



Mime
View raw message