cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1074152 - in /cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport: http/AbstractHTTPDestination.java servlet/ServletDestination.java
Date Thu, 24 Feb 2011 13:56:27 GMT
Author: ningjiang
Date: Thu Feb 24 13:56:26 2011
New Revision: 1074152

URL: http://svn.apache.org/viewvc?rev=1074152&view=rev
Log:
CXF-3362 Fix the servlet systest error

Modified:
    cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java

Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1074152&r1=1074151&r2=1074152&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Thu Feb 24 13:56:26 2011
@@ -376,17 +376,25 @@ public abstract class AbstractHTTPDestin
         return retrieveFromServlet3Async(req);
     }
     protected Message retrieveFromServlet3Async(HttpServletRequest req) {
-        if (req.isAsyncStarted()) {
-            return (Message)req.getAttribute(CXF_CONTINUATION_MESSAGE);
+        try {
+            if (req.isAsyncStarted()) {
+                return (Message)req.getAttribute(CXF_CONTINUATION_MESSAGE);
+            }
+        } catch (Throwable ex) {
+            // the request may not implement the Servlet3 API
         }
         return null;
     }
     protected void setupContinuation(Message inMessage,
                       final HttpServletRequest req, 
                       final HttpServletResponse resp) {
-        if (isServlet3 && req.isAsyncSupported()) {
-            inMessage.put(ContinuationProvider.class.getName(), 
+        try {
+            if (isServlet3 && req.isAsyncSupported()) {
+                inMessage.put(ContinuationProvider.class.getName(), 
                           new Servlet3ContinuationProvider(req, resp, inMessage));
+            }
+        } catch (Throwable ex) {
+            // the request may not implement the Servlet3 API
         }
     }
     protected String getBasePath(String contextPath) throws IOException {

Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java?rev=1074152&r1=1074151&r2=1074152&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
Thu Feb 24 13:56:26 2011
@@ -76,8 +76,12 @@ public class ServletDestination extends 
     protected Message retrieveFromServlet3Async(HttpServletRequest req) {
         // It looks current Servlet3 implementation request doesn't pass the isAsyncStart

         // status to the redispatched request
-        if (req.isAsyncSupported()) {
-            return (Message)req.getAttribute(CXF_CONTINUATION_MESSAGE);
+        try {
+            if (req.isAsyncSupported()) {
+                return (Message)req.getAttribute(CXF_CONTINUATION_MESSAGE);
+            }
+        } catch (AbstractMethodError ex) {
+            // the request may not implement the Servlet3 API
         }
         return null;
     }



Mime
View raw message