Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion client/src/main/java/org/apache/cloudstack/ServerDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.eclipse.jetty.server.handler.MovedContextHandler;
import org.eclipse.jetty.server.handler.RequestLogHandler;
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.eclipse.jetty.server.session.SessionHandler;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler;
Expand Down Expand Up @@ -92,6 +93,7 @@ public class ServerDaemon implements Daemon {
private String keystoreFile;
private String keystorePassword;
private String webAppLocation;
private SessionHandler sessionHandler;

//////////////////////////////////////////////////
/////////////// Public methods ///////////////////
Expand Down Expand Up @@ -184,6 +186,7 @@ public void start() throws Exception {
createHttpsConnector(httpConfig);

server.start();
sessionHandler.setMaxInactiveInterval(sessionTimeout * 60);
server.join();
}

Expand Down Expand Up @@ -240,7 +243,7 @@ private HandlerCollection createHandlers() {
final WebAppContext webApp = new WebAppContext();
webApp.setContextPath(contextPath);
webApp.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
webApp.getSessionHandler().setMaxInactiveInterval(sessionTimeout * 60);
sessionHandler = webApp.getSessionHandler();

// GZIP handler
final GzipHandler gzipHandler = new GzipHandler();
Expand Down