@@ -, +, @@ --- .../catalina/session/PersistentManagerBase.java | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) --- a/java/org/apache/catalina/session/PersistentManagerBase.java +++ a/java/org/apache/catalina/session/PersistentManagerBase.java @@ -718,19 +718,7 @@ public abstract class PersistentManagerBase extends ManagerBase } if (session != null) { - if(log.isDebugEnabled()) - log.debug(sm.getString("persistentManager.swapIn", id)); - - session.setManager(this); - // make sure the listeners know about it. - ((StandardSession)session).tellNew(); - add(session); - ((StandardSession)session).activate(); - // endAccess() to ensure timeouts happen correctly. - // access() to keep access count correct or it will end up - // negative - session.access(); - session.endAccess(); + reactivateLoadedSession(id, session); } } } @@ -744,6 +732,21 @@ public abstract class PersistentManagerBase extends ManagerBase } + private void reactivateLoadedSession(String id, Session session) { + if(log.isDebugEnabled()) + log.debug(sm.getString("persistentManager.swapIn", id)); + + session.setManager(this); + // make sure the listeners know about it. + ((StandardSession)session).tellNew(); + add(session); + ((StandardSession)session).activate(); + // endAccess() to ensure timeouts happen correctly. + // access() to keep access count correct or it will end up + // negative + session.access(); + session.endAccess(); + } private Session loadSessionFromStore(String id) throws IOException { try { --