Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0002317: Upgrade Jetty to version 9.2.11.v20150529
  • Loading branch information
chenson42 committed Sep 24, 2015
1 parent 3acbce0 commit db1f0e6
Showing 1 changed file with 9 additions and 5 deletions.
Expand Up @@ -260,11 +260,6 @@ public SymmetricWebServer start(int httpPort, int securePort, int httpJmxPort, M
// webapp.addServlet(DefaultServlet.class, "/*");

SessionManager sm = new SessionManager();
sm.setMaxInactiveInterval(10 * 60);
sm.setLazyLoad(true);
sm.setDeleteUnrestorableSessions(true);
// sm.setSessionCookie(sm.getSessionCookie() + (httpPort > 0 ? httpPort
// : securePort));
webapp.getSessionHandler().setSessionManager(sm);

webapp.getServletContext().getContextHandler()
Expand Down Expand Up @@ -580,6 +575,15 @@ public boolean isJmxEnabled() {

class SessionManager extends HashSessionManager {

public SessionManager() {
setMaxInactiveInterval(10 * 60);
setLazyLoad(true);
setDeleteUnrestorableSessions(true);
log.info("My session cookie is {}", getSessionCookie());
setSessionCookie(getSessionCookie() + (httpPort > 0 ? httpPort
: httpsPort));
}

@Override
protected AbstractSession newSession(HttpServletRequest request) {
return new Session(this, request);
Expand Down

0 comments on commit db1f0e6

Please sign in to comment.