[jboss-cvs] JBossAS SVN: r92710 - trunk/tomcat/src/main/org/jboss/web/tomcat/service/session.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Aug 23 12:56:27 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-08-23 12:56:27 -0400 (Sun, 23 Aug 2009)
New Revision: 92710
Modified:
trunk/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java
Log:
[JBAS-7186] First cut at better handling of SuspectException during gravitation
Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java 2009-08-23 16:56:12 UTC (rev 92709)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/session/JBossCacheManager.java 2009-08-23 16:56:27 UTC (rev 92710)
@@ -2016,6 +2016,7 @@
{
ContextClassLoaderSwitcher.SwitchContext switcher = null;
boolean doTx = false;
+ boolean loadCompleted = false;
try
{
// We need transaction so any data gravitation replication
@@ -2051,6 +2052,8 @@
: ClusteredSessionNotificationCause.FAILOVER;
session.notifyDidActivate(cause);
}
+
+ loadCompleted = true;
}
catch (Exception ex)
{
@@ -2076,7 +2079,30 @@
try {
if(doTx)
{
- batchingManager.endBatch();
+ try
+ {
+ batchingManager.endBatch();
+ }
+ catch (Exception e)
+ {
+ if (loadCompleted)
+ {
+ // We read the data successfully but then failed in commit?
+ // That indicates a JBC data gravitation where the replication of
+ // the gravitated data to our buddy failed. We can ignore that
+ // and count on this request updating the cache. //
+ log_.warn("Problem ending batch after loading session " + realId + " -- " + e.getLocalizedMessage() + " However session data was successful loaded.");
+ log_.debug("Failure cause", e);
+ }
+ else
+ {
+ if (e instanceof RuntimeException)
+ throw (RuntimeException) e;
+
+ throw new RuntimeException("loadSession(): failed to load session " +
+ realId, e);
+ }
+ }
}
}
finally {
More information about the jboss-cvs-commits
mailing list