diff options
author | Alexander Kurtakov | 2016-12-14 17:29:44 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2016-12-15 15:26:10 +0000 |
commit | ad9229f49bc68b0e12c7611fbcabda91bd11380b (patch) | |
tree | 2161d35b36a988fa10c1c6ba472a761ce0f99fbc | |
parent | 1d3b01d9c5aed305b8280d281dc165f1b3cd0cb1 (diff) | |
download | rt.equinox.bundles-ad9229f49bc68b0e12c7611fbcabda91bd11380b.tar.gz rt.equinox.bundles-ad9229f49bc68b0e12c7611fbcabda91bd11380b.tar.xz rt.equinox.bundles-ad9229f49bc68b0e12c7611fbcabda91bd11380b.zip |
Bug 509239 - Adapt to Jetty 9.4 API changes I20170105-0320I20170105-0230I20170104-2000I20170104-0800I20170103-2000
SessionHandler exposes the API now.
Bump version of imported jetty packages to be 9.4 as minimum.
Change-Id: I1c459af948f2c7b8e0e68263006aba4420c426e6
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r-- | bundles/org.eclipse.equinox.http.jetty9/META-INF/MANIFEST.MF | 22 | ||||
-rw-r--r-- | bundles/org.eclipse.equinox.http.jetty9/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java | 11 |
2 files changed, 15 insertions, 18 deletions
diff --git a/bundles/org.eclipse.equinox.http.jetty9/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.http.jetty9/META-INF/MANIFEST.MF index bcbcb72b1..e020e9b83 100644 --- a/bundles/org.eclipse.equinox.http.jetty9/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.http.jetty9/META-INF/MANIFEST.MF @@ -9,17 +9,17 @@ Bundle-Activator: org.eclipse.equinox.http.jetty.internal.Activator Import-Package: javax.servlet;version="[2.6.0,4.0.0)", javax.servlet.http;version="[2.6.0,4.0.0)", org.eclipse.equinox.http.servlet;version="[1.2.0,2.0.0)", - org.eclipse.jetty.http;version="[9.0.0,10.0.0)", - org.eclipse.jetty.server;version="[9.0.0,10.0.0)", - org.eclipse.jetty.server.handler;version="[9.0.0,10.0.0)", - org.eclipse.jetty.server.nio;version="[9.0.0,10.0.0)", - org.eclipse.jetty.server.session;version="[9.0.0,10.0.0)", - org.eclipse.jetty.servlet;version="[9.0.0,10.0.0)", - org.eclipse.jetty.util;version="[9.0.0,10.0.0)", - org.eclipse.jetty.util.component;version="[9.0.0,10.0.0)", - org.eclipse.jetty.util.log;version="[9.0.0,10.0.0)", - org.eclipse.jetty.util.ssl;version="[9.0.0,10.0.0)", - org.eclipse.jetty.util.thread;version="[9.0.0,10.0.0)", + org.eclipse.jetty.http;version="[9.4.0,10.0.0)", + org.eclipse.jetty.server;version="[9.4.0,10.0.0)", + org.eclipse.jetty.server.handler;version="[9.4.0,10.0.0)", + org.eclipse.jetty.server.nio;version="[9.4.0,10.0.0)", + org.eclipse.jetty.server.session;version="[9.4.0,10.0.0)", + org.eclipse.jetty.servlet;version="[9.4.0,10.0.0)", + org.eclipse.jetty.util;version="[9.4.0,10.0.0)", + org.eclipse.jetty.util.component;version="[9.4.0,10.0.0)", + org.eclipse.jetty.util.log;version="[9.4.0,10.0.0)", + org.eclipse.jetty.util.ssl;version="[9.4.0,10.0.0)", + org.eclipse.jetty.util.thread;version="[9.4.0,10.0.0)", org.osgi.framework;version="1.3.0", org.osgi.framework.startlevel;version="1.0.0", org.osgi.framework.wiring;version="1.2.0", diff --git a/bundles/org.eclipse.equinox.http.jetty9/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java b/bundles/org.eclipse.equinox.http.jetty9/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java index 3e9cb6a31..8929003b4 100644 --- a/bundles/org.eclipse.equinox.http.jetty9/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java +++ b/bundles/org.eclipse.equinox.http.jetty9/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java @@ -25,7 +25,6 @@ import org.eclipse.equinox.http.jetty.JettyConstants; import org.eclipse.equinox.http.jetty.JettyCustomizer; import org.eclipse.equinox.http.servlet.HttpServiceServlet; import org.eclipse.jetty.server.*; -import org.eclipse.jetty.server.session.HashSessionManager; import org.eclipse.jetty.server.session.SessionHandler; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; @@ -139,7 +138,7 @@ public class HttpServerManager implements ManagedServiceFactory { if (null != customizer) httpContext = (ServletContextHandler) customizer.customizeContext(httpContext, dictionary); - SessionManager sessionManager = httpContext.getSessionHandler().getSessionManager(); + SessionHandler sessionManager = httpContext.getSessionHandler(); try { sessionManager.addEventListener((HttpSessionIdListener) holder.getServlet()); } catch (ServletException e) { @@ -217,11 +216,9 @@ public class HttpServerManager implements ManagedServiceFactory { File contextWorkDir = new File(workDir, DIR_PREFIX + dictionary.get(Constants.SERVICE_PID).hashCode()); contextWorkDir.mkdir(); httpContext.setAttribute(CONTEXT_TEMPDIR, contextWorkDir); - - HashSessionManager sessionManager = new HashSessionManager(); - sessionManager.setMaxInactiveInterval(Details.getInt(dictionary, JettyConstants.CONTEXT_SESSIONINACTIVEINTERVAL, -1)); - - httpContext.setSessionHandler(new SessionHandler(sessionManager)); + SessionHandler handler = new SessionHandler(); + handler.setMaxInactiveInterval(Details.getInt(dictionary, JettyConstants.CONTEXT_SESSIONINACTIVEINTERVAL, -1)); + httpContext.setSessionHandler(handler); return httpContext; } |