cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1023972 - /cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Date Mon, 18 Oct 2010 20:04:27 GMT
Author: dkulp
Date: Mon Oct 18 20:04:26 2010
New Revision: 1023972

URL: http://svn.apache.org/viewvc?rev=1023972&view=rev
Log:
Fix issues of sessions not really being usable across endpoints on the
same port.

Modified:
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=1023972&r1=1023971&r2=1023972&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Mon Oct 18 20:04:26 2010
@@ -41,6 +41,7 @@ import org.eclipse.jetty.server.Abstract
 import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.SessionManager;
 import org.eclipse.jetty.server.handler.ContextHandler;
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.server.handler.DefaultHandler;
@@ -107,6 +108,7 @@ public class JettyHTTPServerEngine
     private JettyConnectorFactory connectorFactory;
     private ContextHandlerCollection contexts;
     
+    private SessionManager sessionManager;
     
     /**
      * This field holds the TLS ServerParameters that are programatically
@@ -398,10 +400,12 @@ public class JettyHTTPServerEngine
         // bind the jetty http handler with the context handler
         if (isSessionSupport) {         
             // If we have sessions, we need two handlers.
-            HashSessionManager sessionManager = new HashSessionManager();
+            if (sessionManager == null) {
+                sessionManager = new HashSessionManager();
+                HashSessionIdManager idManager = new HashSessionIdManager();
+                sessionManager.setIdManager(idManager);
+            }
             SessionHandler sessionHandler = new SessionHandler(sessionManager);
-            HashSessionIdManager idManager = new HashSessionIdManager();
-            sessionManager.setIdManager(idManager);
             HandlerCollection hc = new HandlerCollection();
             hc.addHandler(handler);
             hc.addHandler(sessionHandler);



Mime
View raw message