[jboss-cvs] JBossAS SVN: r105107 - trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 21 16:21:59 EDT 2010
Author: bstansberry at jboss.com
Date: 2010-05-21 16:21:58 -0400 (Fri, 21 May 2010)
New Revision: 105107
Modified:
trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java
Log:
[JBAS-8002] During startup include full session count when deciding on passivation
Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java 2010-05-21 18:18:27 UTC (rev 105106)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java 2010-05-21 20:21:58 UTC (rev 105107)
@@ -1547,6 +1547,11 @@
try
{
IncomingDistributableSessionData sessionData = proxy_.getSessionData(realId, owner, false);
+ if (sessionData == null)
+ {
+ log_.debug("Metadata unavailable for unloaded session " + realId);
+ continue;
+ }
ts = sessionData.getTimestamp();
md = sessionData.getMetadata();
}
@@ -1554,7 +1559,7 @@
{
// most likely a lock conflict if the session is being updated remotely;
// ignore it and use default values for timstamp and maxInactive
- log_.debug("Problem reading metadata for session " + realId + " -- " + e.toString());
+ log_.debug("Problem reading metadata for session " + realId + " -- " + e.toString(), e);
}
long lastMod = ts == -1 ? System.currentTimeMillis() : ts;
@@ -1562,11 +1567,17 @@
OwnedSessionUpdate osu = new OwnedSessionUpdate(owner, lastMod, maxLife, false);
unloadedSessions_.put(realId, osu);
- if (passivate)
+ }
+
+ if (passivate)
+ {
+ for (Map.Entry<String, OwnedSessionUpdate> entry : unloadedSessions_.entrySet())
{
+ String realId = entry.getKey();
+ OwnedSessionUpdate osu = entry.getValue();
try
{
- long elapsed = System.currentTimeMillis() - lastMod;
+ long elapsed = System.currentTimeMillis() - osu.getUpdateTime();
// if maxIdle time configured, means that we need to passivate sessions that have
// exceeded the max allowed idle time
if (passivationMax >= 0
More information about the jboss-cvs-commits
mailing list