X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=lib%2Fjetty%2Forg%2Feclipse%2Fjetty%2Fserver%2Fsession%2FJDBCSessionManager.java;fp=lib%2Fjetty%2Forg%2Feclipse%2Fjetty%2Fserver%2Fsession%2FJDBCSessionManager.java;h=1680c1b8696a0a28be66b5d059a67596646722c6;hp=dbe95335dae2067acbc3bd18484ee557c313734e;hb=aa5723dbb64ec8efa63909d39ff72364f0a5ee96;hpb=e443f19911df6a30ab07ef70d23970bda671b194 diff --git a/lib/jetty/org/eclipse/jetty/server/session/JDBCSessionManager.java b/lib/jetty/org/eclipse/jetty/server/session/JDBCSessionManager.java index dbe95335..1680c1b8 100644 --- a/lib/jetty/org/eclipse/jetty/server/session/JDBCSessionManager.java +++ b/lib/jetty/org/eclipse/jetty/server/session/JDBCSessionManager.java @@ -1,6 +1,6 @@ // // ======================================================================== -// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd. +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. // ------------------------------------------------------------------------ // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 @@ -37,10 +37,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSessionEvent; -import javax.servlet.http.HttpSessionListener; - -import org.eclipse.jetty.server.SessionIdManager; import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.server.session.JDBCSessionIdManager.SessionTableSchema; import org.eclipse.jetty.util.ClassLoadingObjectInputStream; @@ -512,17 +508,20 @@ public class JDBCSessionManager extends AbstractSessionManager { if (memSession==null) { - LOG.debug("getSession("+idInCluster+"): no session in session map. Reloading session data from db."); + if (LOG.isDebugEnabled()) + LOG.debug("getSession("+idInCluster+"): no session in session map. Reloading session data from db."); session = loadSession(idInCluster, canonicalize(_context.getContextPath()), getVirtualHost(_context)); } else if ((now - memSession._lastSaved) >= (_saveIntervalSec * 1000L)) { - LOG.debug("getSession("+idInCluster+"): stale session. Reloading session data from db."); + if (LOG.isDebugEnabled()) + LOG.debug("getSession("+idInCluster+"): stale session. Reloading session data from db."); session = loadSession(idInCluster, canonicalize(_context.getContextPath()), getVirtualHost(_context)); } else { - LOG.debug("getSession("+idInCluster+"): session in session map"); + if (LOG.isDebugEnabled()) + LOG.debug("getSession("+idInCluster+"): session in session map"); session = memSession; } } @@ -562,7 +561,8 @@ public class JDBCSessionManager extends AbstractSessionManager } else { - LOG.debug("getSession ({}): Session has expired", idInCluster); + if (LOG.isDebugEnabled()) + LOG.debug("getSession ({}): Session has expired", idInCluster); //ensure that the session id for the expired session is deleted so that a new session with the //same id cannot be created (because the idInUse() test would succeed) _jdbcSessionIdMgr.removeSession(idInCluster); @@ -574,7 +574,8 @@ public class JDBCSessionManager extends AbstractSessionManager { //the session loaded from the db and the one in memory are the same, so keep using the one in memory session = memSession; - LOG.debug("getSession({}): Session not stale {}", idInCluster,session); + if (LOG.isDebugEnabled()) + LOG.debug("getSession({}): Session not stale {}", idInCluster,session); } } else