Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8002

Initial passivation of sessions during startup not based on full set of sessions

XMLWordPrintable

      JBossCacheManager.initializeUnloadedSessions() creates a map of sessions stored in the cache, key = session id, value = some metadata about the session. As it does this, it, passivates sessions if:

      1) the last access time for the session > passivationMaxIdleTime_

      2) OR, # of sessions > maxActiveAllowed_ && last access time for the session > passivationMaxIdleTime_

      Problem is 2) can only work correctly if # of session is the full count of sessions, not just the count so far through the loop. Otherwise you can have more sessions than you want, but the loop doesn't get to the point where it recognizes that until after sessions whose last access time for the session > passivationMaxIdleTime_ have been processed. Those sessions won't get passivated, and will end up remaining in memory.

      Effect: after the webapp is started, more sessions are in memory than intended, until the first run of the background processing thread at which point they will be passivated.

      Fix is to store all sessions in the unloadedSessions_ map, and then do a second loop for the passivation part.

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: