bobh 2002/08/27 12:11:20 Modified: catalina/src/share/org/apache/catalina/session PersistentManagerBase.java StoreBase.java Log: This is a fix for bug 5507. Revision Changes Path 1.2 +24 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java Index: PersistentManagerBase.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PersistentManagerBase.java 18 Jul 2002 16:47:53 -0000 1.1 +++ PersistentManagerBase.java 27 Aug 2002 19:11:20 -0000 1.2 @@ -377,6 +377,26 @@ /** + * Return true, if the session id is loaded in memory + * otherwise false is returned + * + * @param id The session id for the session to be searched for + * + * @exception IOException if an input/output error occurs while + * processing this request + */ + public boolean isLoaded( String id ){ + try { + if ( super.findSession(id) != null ) + return true; + } catch (IOException e) { + log("checking isLoaded for id, " + id + ", "+e.getMessage(), e); + } + return false; + } + + + /** * Return the maximum number of active Sessions allowed, or -1 for * no limit. */ 1.2 +11 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StoreBase.java Index: StoreBase.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StoreBase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- StoreBase.java 18 Jul 2002 16:47:53 -0000 1.1 +++ StoreBase.java 27 Aug 2002 19:11:20 -0000 1.2 @@ -313,7 +313,13 @@ int timeIdle = // Truncate, do not round up (int) ((timeNow - session.getLastAccessedTime()) / 1000L); if (timeIdle >= maxInactiveInterval) { - session.expire(); + if ( ( (PersistentManagerBase) manager).isLoaded( keys[i] )) { + // recycle old backup session + session.recycle(); + } else { + // expire swapped out session + session.expire(); + } remove(session.getId()); } } catch (IOException e) {
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>