You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Christopher K. St. John" <ck...@distributopia.com> on 2001/12/19 19:13:02 UTC

PersistentManagerBase.processMaxActiveSwaps()

 I've been messing around with PersistentManager,
trying to get sessions to swap out based on maxActiveSessions.
There's a check in processMaxActiveSwaps():

        Session sessions[] = findSessions();
        // FIXME: Smarter algorithm (LRU)
        if (getMaxActiveSessions() >= sessions.length)
            return;

 And also one in createSession():

      if ((maxActiveSessions >= 0) &&
          (sessions.size() >= maxActiveSessions))
            throw new IllegalStateException
                (sm.getString("standardManager.createSession.ise"));

 I'm not seeing any way that the check in processMaxActiveSwaps()
could ever fail, since createSessions() will refuse to 
create more than maxActiveSession Sessions. Which would
mean that processMaxActiveSwaps() never gets any farther
than that check, and never swaps anything out.


-- 
Christopher St. John cks@distributopia.com
DistribuTopia http://www.distributopia.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>