[jboss-cvs] JBossAS SVN: r108404 - branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 1 11:49:28 EDT 2010


Author: bstansberry at jboss.com
Date: 2010-10-01 11:49:26 -0400 (Fri, 01 Oct 2010)
New Revision: 108404

Modified:
   branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java
Log:
[JBPAPP-4094] Don't call expire when processing remote invalidation of clustered session

Modified: branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java	2010-10-01 14:37:24 UTC (rev 108403)
+++ branches/JBPAPP_4_2_0_GA_CP/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java	2010-10-01 15:49:26 UTC (rev 108404)
@@ -1419,35 +1419,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