cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r989436 - /cxf/trunk/rt/transports/http-osgi/src/main/java/org/apache/cxf/transport/http_osgi/OsgiServletController.java
Date Thu, 26 Aug 2010 03:28:20 GMT
Author: ffang
Date: Thu Aug 26 03:28:18 2010
New Revision: 989436

URL: http://svn.apache.org/viewvc?rev=989436&view=rev
Log:
[CXF-2947]http-osgi transport doesn't updateDests correct for the second service

Modified:
    cxf/trunk/rt/transports/http-osgi/src/main/java/org/apache/cxf/transport/http_osgi/OsgiServletController.java

Modified: cxf/trunk/rt/transports/http-osgi/src/main/java/org/apache/cxf/transport/http_osgi/OsgiServletController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-osgi/src/main/java/org/apache/cxf/transport/http_osgi/OsgiServletController.java?rev=989436&r1=989435&r2=989436&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-osgi/src/main/java/org/apache/cxf/transport/http_osgi/OsgiServletController.java
(original)
+++ cxf/trunk/rt/transports/http-osgi/src/main/java/org/apache/cxf/transport/http_osgi/OsgiServletController.java
Thu Aug 26 03:28:18 2010
@@ -53,8 +53,7 @@ import org.apache.cxf.wsdl.http.AddressT
 
 public class OsgiServletController extends AbstractServletController {
     private static final Logger LOG = LogUtils.getL7dLogger(OsgiServlet.class);
-    
-    private volatile String lastBase = "";
+      
     private OsgiServlet servlet;
     public OsgiServletController(OsgiServlet servlet) {
         super(servlet.getServletConfig());
@@ -67,23 +66,18 @@ public class OsgiServletController exten
         }
         String base = forcedBaseAddress == null ? getBaseURL(request) : forcedBaseAddress;
 
-        if (base.equals(lastBase)) {
-            return;
-        }
-        
+               
         Set<String> paths = servlet.getTransport().getDestinationsPaths();
         for (String path : paths) {
             OsgiDestination d2 = servlet.getTransport().getDestinationForPath(path);
             String ad = d2.getEndpointInfo().getAddress();
-            if (ad.equals(path)
-                || ad.equals(lastBase + path)) {
+            if (ad.equals(path)) {
                 d2.getEndpointInfo().setAddress(base + path);
                 if (d2.getEndpointInfo().getExtensor(AddressType.class) != null) {
                     d2.getEndpointInfo().getExtensor(AddressType.class).setLocation(base
+ path);
                 }
             }
         }
-        lastBase = base;
     }
 
     public void invoke(HttpServletRequest request, HttpServletResponse res) throws ServletException
{



Mime
View raw message