cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1170735 - in /cxf/branches/2.4.x-fixes: ./ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Date Wed, 14 Sep 2011 17:51:04 GMT
Author: dkulp
Date: Wed Sep 14 17:51:04 2011
New Revision: 1170735

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

........
  r1170730 | dkulp | 2011-09-14 13:43:47 -0400 (Wed, 14 Sep 2011) | 1 line
  
  Get the JettyHTTPServerEngine able to support both Jetty 7.5 and 7.4
........

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

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

Modified: cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=1170735&r1=1170734&r2=1170735&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Wed Sep 14 17:51:04 2011
@@ -42,6 +42,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.SessionIdManager;
 import org.eclipse.jetty.server.SessionManager;
 import org.eclipse.jetty.server.handler.ContextHandler;
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
@@ -404,7 +405,21 @@ public class JettyHTTPServerEngine
             if (sessionManager == null) {
                 sessionManager = new HashSessionManager();
                 HashSessionIdManager idManager = new HashSessionIdManager();
-                sessionManager.setIdManager(idManager);
+                
+                try {
+                    //for JETTY 7.5
+                    sessionManager.getClass().getMethod("setSessionIdManager", SessionIdManager.class)
+                        .invoke(sessionManager, idManager);
+                } catch (Exception e) {
+                    //for JETTY <=7.4.x
+                    try {
+                        sessionManager.getClass().getMethod("setIdManager", SessionIdManager.class)
+                            .invoke(sessionManager, idManager);
+                    } catch (Exception e1) {
+                        throw new Fault(new Message("START_UP_SERVER_FAILED_MSG", LOG,
+                                                    e.getMessage(), port), e);          
             
+                    }
+                }
             }
             SessionHandler sessionHandler = new SessionHandler(sessionManager);
             if (securityHandler != null) {



Mime
View raw message