]> WPIA git - gigi.git/blobdiff - lib/jetty/org/eclipse/jetty/server/session/JDBCSessionManager.java
updating jetty to jetty-9.2.16.v2016040
[gigi.git] / lib / jetty / org / eclipse / jetty / server / session / JDBCSessionManager.java
index dbe95335dae2067acbc3bd18484ee557c313734e..1680c1b8696a0a28be66b5d059a67596646722c6 100644 (file)
@@ -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