cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1337293 - in /cxf/trunk: api/src/main/java/org/apache/cxf/interceptor/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/
Date Fri, 11 May 2012 17:35:28 GMT
Author: dkulp
Date: Fri May 11 17:35:27 2012
New Revision: 1337293

URL: http://svn.apache.org/viewvc?rev=1337293&view=rev
Log:
[CXF-4312] Similar issue on the server side about having an executor set
by default.   Not needed if the rest of the code guards against NPE

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java?rev=1337293&r1=1337292&r2=1337293&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java
Fri May 11 17:35:27 2012
@@ -88,7 +88,8 @@ public class ServiceInvokerInterceptor e
         };
         
         Executor executor = getExecutor(endpoint);
-        if (exchange.get(Executor.class) == executor) {
+        Executor executor2 = exchange.get(Executor.class);
+        if (executor2 == executor || executor == null) {
             // already executing on the appropriate executor
             invocation.run();
         } else {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java?rev=1337293&r1=1337292&r2=1337293&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceImpl.java Fri
May 11 17:35:27 2012
@@ -50,7 +50,6 @@ import org.apache.cxf.service.model.Mess
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
-import org.apache.cxf.workqueue.SynchronousExecutor;
 
 /**
  * The CXF Service implementation which is used 
@@ -74,7 +73,6 @@ public class JAXRSServiceImpl extends Ab
 
     public JAXRSServiceImpl(List<ClassResourceInfo> cri, QName qname) {
         this.classResourceInfos = cri;
-        executor = SynchronousExecutor.getInstance();    
         this.serviceName = qname;
     }
     

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java?rev=1337293&r1=1337292&r2=1337293&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java Fri May 11 17:35:27 2012
@@ -22,6 +22,7 @@ package org.apache.cxf.ws.rm;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.Executor;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -41,6 +42,7 @@ import org.apache.cxf.service.model.Endp
 import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.transport.Conduit;
+import org.apache.cxf.workqueue.SynchronousExecutor;
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.addressing.RelatesToType;
@@ -169,7 +171,11 @@ public class Proxy {
                     }
                 }
             };
-            reliableEndpoint.getApplicationEndpoint().getExecutor().execute(r);
+            Executor ex = reliableEndpoint.getApplicationEndpoint().getExecutor();
+            if (ex == null) {
+                ex = SynchronousExecutor.getInstance();
+            }
+            ex.execute(r);
             return null;
         }
         

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java?rev=1337293&r1=1337292&r2=1337293&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
(original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
Fri May 11 17:35:27 2012
@@ -49,6 +49,7 @@ import org.apache.cxf.message.MessageUti
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.MessageObserver;
+import org.apache.cxf.workqueue.SynchronousExecutor;
 import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
@@ -527,7 +528,11 @@ public class RetransmissionQueueImpl imp
             Executor executor = ep.getExecutor();
             if (null == executor) {
                 executor = ep.getService().getExecutor();
-                LOG.log(Level.FINE, "Using service executor {0}", executor.getClass().getName());
+                if (executor == null) {
+                    executor = SynchronousExecutor.getInstance();
+                } else {
+                    LOG.log(Level.FINE, "Using service executor {0}", executor.getClass().getName());
+                }
             } else {
                 LOG.log(Level.FINE, "Using endpoint executor {0}", executor.getClass().getName());
             }



Mime
View raw message