-
Bug
-
Resolution: Done
-
Minor
-
JBossAS-5.1.0.GA, 6.0.0.M3
-
None
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.
- is related to
-
JBPAPP-4275 Initial passivation of sessions during startup not based on full set of sessions
- Closed