cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r980579 - in /cxf/branches/2.2.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/http/ rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/
Date Thu, 29 Jul 2010 21:14:14 GMT
Author: dkulp
Date: Thu Jul 29 21:14:13 2010
New Revision: 980579

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

........
  r980288 | ema | 2010-07-28 22:15:45 -0400 (Wed, 28 Jul 2010) | 1 line
  
  [CXF-2911]:Added the httpservletrequest snapshot in message for oneway operation with WSA
enabled
........

Added:
    cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpServletRequestSnapshot.java
      - copied unchanged from r980288, cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpServletRequestSnapshot.java
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
    cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java

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

Modified: cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java?rev=980579&r1=980578&r2=980579&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletDestination.java
Thu Jul 29 21:14:13 2010
@@ -35,6 +35,7 @@ import org.apache.cxf.service.model.Endp
 import org.apache.cxf.transport.ConduitInitiator;
 import org.apache.cxf.transport.http.AbstractHTTPDestination;
 import org.apache.cxf.transport.http.HTTPSession;
+import org.apache.cxf.transport.http.HttpServletRequestSnapshot;
 
 
 public class ServletDestination extends AbstractHTTPDestination {
@@ -89,7 +90,10 @@ public class ServletDestination extends 
                      context,
                      req,
                      resp);
-
+        //the HttpServletRequest will be recycled in another thread when the operation 
+        //is oneway and WSA enabled. This SNAPSHOT request will be used in tihs case.
+        
+        inMessage.put("HTTP.REQUEST.SNAPSHOT", new HttpServletRequestSnapshot(req));
         ExchangeImpl exchange = new ExchangeImpl();
         exchange.setInMessage(inMessage);
         exchange.setSession(new HTTPSession(req));

Modified: cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java?rev=980579&r1=980578&r2=980579&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
Thu Jul 29 21:14:13 2010
@@ -412,6 +412,14 @@ public final class ContextUtils {
                         // has been sent (i.e. to a oneway, or a partial response
                         // to a decoupled twoway)
                         
+                        //In tomcat container, the httpServletRequest will be recycled/cleared
in the 
+                        //servlet thread. The values in request can not be retrieved in the
new created
+                        //thread after that . Replace it with httpServletRequest snaphost.
+                        if (inMessage.get("HTTP.REQUEST") != null
+                            && inMessage.get("HTTP.REQUEST.SNAPSHOT") != null) {
+                            inMessage.put("HTTP.REQUEST", inMessage.get("HTTP.REQUEST.SNAPSHOT"));
+
+                        }                   
                         // pause dispatch on current thread ...
                         inMessage.getInterceptorChain().pause();
 



Mime
View raw message