cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1546130 - in /cxf/branches/2.7.x-fixes: api/src/main/java/org/apache/cxf/continuations/ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/...
Date Wed, 27 Nov 2013 17:34:22 GMT
Author: dkulp
Date: Wed Nov 27 17:34:22 2013
New Revision: 1546130

URL: http://svn.apache.org/r1546130
Log:
Merged revisions 1544608 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1544608 | dkulp | 2013-11-22 12:28:11 -0500 (Fri, 22 Nov 2013) | 2 lines

  [CXF-5414] If a continuation is complete, make sure we let he container know so timeouts
will cancel.

........

Modified:
    cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
    cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
    cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java
    cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Servlet3ContinuationProvider.java
    cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java

Modified: cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java?rev=1546130&r1=1546129&r2=1546130&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
(original)
+++ cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
Wed Nov 27 17:34:22 2013
@@ -30,4 +30,9 @@ public interface ContinuationProvider {
      * @return transport-neutral ContinuationWrapper
      */
     Continuation getContinuation();
+    
+    /**
+     * Let the provider know that the exchange is complete
+     */
+    void complete();
 }

Modified: cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?rev=1546130&r1=1546129&r2=1546130&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
Wed Nov 27 17:34:22 2013
@@ -355,6 +355,10 @@ public class JettyHTTPDestination extend
             incomingObserver.onMessage(inMessage);
             resp.flushBuffer();
             baseRequest.setHandled(true);
+            ContinuationProvider p = inMessage.get(ContinuationProvider.class);
+            if (p != null) {
+                p.complete();
+            }
         } catch (SuspendedInvocationException ex) {
             if (ex.getRuntimeException() != null) {
                 throw ex.getRuntimeException();

Modified: cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java?rev=1546130&r1=1546129&r2=1546130&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java
Wed Nov 27 17:34:22 2013
@@ -40,6 +40,14 @@ public class JettyContinuationProvider i
         response = resp;
         this.inMessage = m;
     }
+    
+    public void complete() {
+        JettyContinuationWrapper r = getContinuation(false);
+        if (r != null) {
+            r.reset();
+        }
+        wrapper = null;
+    }
     public Continuation getContinuation() {
         return getContinuation(true);
     }    

Modified: cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1546130&r1=1546129&r2=1546130&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Wed Nov 27 17:34:22 2013
@@ -237,6 +237,10 @@ public abstract class AbstractHTTPDestin
         
         try {    
             incomingObserver.onMessage(inMessage);
+            ContinuationProvider p = inMessage.get(ContinuationProvider.class);
+            if (p != null) {
+                p.complete();
+            }
         } catch (SuspendedInvocationException ex) {
             if (ex.getRuntimeException() != null) {
                 throw ex.getRuntimeException();

Modified: cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Servlet3ContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Servlet3ContinuationProvider.java?rev=1546130&r1=1546129&r2=1546130&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Servlet3ContinuationProvider.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Servlet3ContinuationProvider.java
Wed Nov 27 17:34:22 2013
@@ -49,6 +49,14 @@ public class Servlet3ContinuationProvide
         this.req = req;
         this.resp = resp;
     }
+    
+    public void complete() {
+        if (continuation != null) {
+            continuation.reset();
+            continuation = null;
+        }
+    }
+    
 
     /** {@inheritDoc}*/
     public Continuation getContinuation() {
@@ -78,7 +86,7 @@ public class Servlet3ContinuationProvide
             context = req.startAsync(req, resp);
             context.addListener(this);
         }
-        
+
         void startAsyncAgain() {
             
             AsyncContext old = context;

Modified: cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java?rev=1546130&r1=1546129&r2=1546130&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
Wed Nov 27 17:34:22 2013
@@ -51,6 +51,12 @@ public class JMSContinuationProvider imp
         this.jmsListener = jmsListener;
         this.jmsConfig = jmsConfig;
     }
+    public void complete() {
+        JMSContinuation cw = inMessage.get(JMSContinuation.class);
+        if (cw != null) {
+            cw.reset();
+        }
+    }
     
     public Continuation getContinuation() {
         Message m = inMessage;



Mime
View raw message