-
Bug
-
Resolution: Done
-
Minor
-
EAP 5.0.0, EWP 5.0.0, EAP 5.0.1
-
None
I expect this is the cause of JBPAPP-2452.
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.
I expect some difference with the IBM JDK is resulting in a different iteration order, which is why these tests are only failing with IBM.
- relates to
-
JBPAPP-2452 org.jboss.test.cluster.defaultcfg.simpleweb.test.SessionCountUnitTestCase failing with IBM JDK
- Closed
-
JBAS-8002 Initial passivation of sessions during startup not based on full set of sessions
- Closed