cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r600074 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Date Sat, 01 Dec 2007 10:15:12 GMT
Author: ningjiang
Date: Sat Dec  1 02:15:11 2007
New Revision: 600074

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

........
  r600064 | ningjiang | 2007-12-01 17:23:50 +0800 (Sat, 01 Dec 2007) | 1 line
  
  CXF-1236 Fixed the warning message of the JettyHTTPServerEngine
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java

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

Modified: incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=600074&r1=600073&r2=600074&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Sat Dec  1 02:15:11 2007
@@ -354,17 +354,19 @@
      */
     public synchronized void removeServant(URL url) {        
         
-        String contextName = HttpUriMapper.getContextName(url.getPath());
-
+        final String contextName = HttpUriMapper.getContextName(url.getPath());
+        final String smap = HttpUriMapper.getResourceBase(url.getPath());
         boolean found = false;
-        // REVISIT:After a stop(), the server is null, and therefore this 
-        // operation shouldn't find a handler
-        if (server != null) {
+        
+        if (server != null && server.isRunning()) {
             for (Handler handler : contexts.getChildHandlersByClass(ContextHandler.class))
{
-                ContextHandler contextHandler = null;
+                ContextHandler contextHandler = null;                
                 if (handler instanceof ContextHandler) {
                     contextHandler = (ContextHandler) handler;
-                    if (contextName.equals(contextHandler.getContextPath())) {
+                    Handler jh = contextHandler.getHandler();
+                    if (jh instanceof JettyHTTPHandler
+                        && contextName.equals(contextHandler.getContextPath())
+                        && ((JettyHTTPHandler)jh).getName().equals(smap)) {
                         try {
                             contexts.removeHandler(handler);                            
                             handler.stop();
@@ -373,9 +375,9 @@
                             LOG.log(Level.WARNING, "REMOVE_HANDLER_FAILED_MSG", 
                                     new Object[] {ex.getMessage()}); 
                         }
-                        
-                    }
-                    found = true;
+                        found = true;
+                        break;                        
+                    }                    
                 }
             }
         }
@@ -384,12 +386,7 @@
         }
         
         --servantCount;
-        /* Bug in Jetty, we cannot do this.  If we restart later, data goes off
-         * someplace unknown
-        if (servantCount == 0) {
-            server.removeListener(listener);
-        }
-        */
+       
     }
 
     /**



Mime
View raw message