[jboss-cvs] JBossAS SVN: r110669 - branches/JBPAPP_4_2_0_GA_CP05_JBPAPP-4094/tomcat/src/main/org/jboss/web/tomcat/service/session.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 14 13:45:38 EST 2011
Author: dereed
Date: 2011-02-14 13:45:38 -0500 (Mon, 14 Feb 2011)
New Revision: 110669
Modified:
branches/JBPAPP_4_2_0_GA_CP05_JBPAPP-4094/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java
Log:
[JBPAPP-5934] Port JBPAPP-4094 to EAP 4.2 CP05
Modified: branches/JBPAPP_4_2_0_GA_CP05_JBPAPP-4094/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP05_JBPAPP-4094/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java 2011-02-14 18:36:14 UTC (rev 110668)
+++ branches/JBPAPP_4_2_0_GA_CP05_JBPAPP-4094/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java 2011-02-14 18:45:38 UTC (rev 110669)
@@ -1386,35 +1386,15 @@
}
else
{
- // Expire the session
- // DON'T SYNCHRONIZE ON SESSION HERE -- isValid() and
- // expire() are meant to be multi-threaded and synchronize
- // properly internally; synchronizing externally can lead
- // to deadlocks!!
- boolean notify = false; // Don't notify listeners. SRV.10.7
- // allows this, and sending notifications
- // leads to all sorts of issues; e.g.
- // circular calls with ClusteredSSO
- boolean localCall = false; // this call originated from the cache;
- // we have already removed session
- boolean localOnly = true; // Don't pass attr removals to cache
+ // JBAS-4094 Don't call session expire as that can lead to deadlock
+ // Just do the bare minimum to remove the session
+ session.setValid(false);
- // Ensure the correct TCL is in place
- ClassLoader prevTcl = Thread.currentThread().getContextClassLoader();
- try
- {
- Thread.currentThread().setContextClassLoader(tcl_);
- session.expire(notify, localCall, localOnly, ClusteredSessionNotificationCause.TIMEOUT);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(prevTcl);
- }
-
// Remove any stats for this session
stats_.removeStats(realId);
- // Update counter.
+ // Update counters.
+ expiredCounter_++;
activeCounter_--;
}
}
More information about the jboss-cvs-commits
mailing list