[jboss-cvs] JBossAS SVN: r105118 - in trunk: tomcat/src/main/java/org/jboss/web/tomcat/service/session and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 21 23:44:48 EDT 2010
Author: bstansberry at jboss.com
Date: 2010-05-21 23:44:48 -0400 (Fri, 21 May 2010)
New Revision: 105118
Modified:
trunk/component-matrix/pom.xml
trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java
Log:
[JBAS-8043] Push JBossCacheManager loadSession logic into the ha-server-cache-jbc
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2010-05-22 02:43:41 UTC (rev 105117)
+++ trunk/component-matrix/pom.xml 2010-05-22 03:44:48 UTC (rev 105118)
@@ -93,10 +93,10 @@
<version.org.jboss.cache.pojo>3.0.0.GA</version.org.jboss.cache.pojo>
<version.org.jboss.cl>2.2.0.Alpha4</version.org.jboss.cl>
<version.org.jboss.classpool>1.0.0.Alpha5</version.org.jboss.classpool>
- <version.org.jboss.cluster.cache.jbc>2.2.1.Final</version.org.jboss.cluster.cache.jbc>
+ <version.org.jboss.cluster.cache.jbc>2.2.2.Final</version.org.jboss.cluster.cache.jbc>
<version.org.jboss.cluster.cache.spi>2.1.0.Final</version.org.jboss.cluster.cache.spi>
<version.org.jboss.cluster.client>1.1.1.GA</version.org.jboss.cluster.client>
- <version.org.jboss.cluster.server.api>2.0.0.Alpha2</version.org.jboss.cluster.server.api>
+ <version.org.jboss.cluster.server.api>2.0.0.Alpha3</version.org.jboss.cluster.server.api>
<version.org.jboss.common.core>2.2.17.GA</version.org.jboss.common.core>
<version.org.jboss.deployers>2.2.0.Alpha4</version.org.jboss.deployers>
<version.org.jboss.ejb3.bom>0.1.2</version.org.jboss.ejb3.bom>
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-22 02:43:41 UTC (rev 105117)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java 2010-05-22 03:44:48 UTC (rev 105118)
@@ -2108,25 +2108,25 @@
return session;
}
- ContextClassLoaderSwitcher.SwitchContext switcher = null;
- boolean doTx = false;
- boolean loadCompleted = false;
- try
- {
+// ContextClassLoaderSwitcher.SwitchContext switcher = null;
+// boolean doTx = false;
+// boolean loadCompleted = false;
+// try
+// {
// We need transaction so any data gravitation replication
// is sent in batch.
// Don't do anything if there is already transaction context
// associated with this thread.
- if (batchingManager.isBatchInProgress() == false)
- {
- batchingManager.startBatch();
- doTx = true;
- }
-
- // Tomcat calls Manager.findSession before setting the tccl,
- // so we need to do it :(
- switcher = getContextClassLoaderSwitcher().getSwitchContext();
- switcher.setClassLoader(tcl_);
+// if (batchingManager.isBatchInProgress() == false)
+// {
+// batchingManager.startBatch();
+// doTx = true;
+// }
+//
+// // Tomcat calls Manager.findSession before setting the tccl,
+// // so we need to do it :(
+// switcher = getContextClassLoaderSwitcher().getSwitchContext();
+// switcher.setClassLoader(tcl_);
IncomingDistributableSessionData data = proxy_.getSessionData(realId, initialLoad);
if (data != null)
@@ -2147,65 +2147,65 @@
session.notifyDidActivate(cause);
}
- loadCompleted = true;
- }
- catch (Exception ex)
- {
- try
- {
- // if(doTx)
- // Let's set it no matter what.
- batchingManager.setBatchRollbackOnly();
- }
- catch (Exception exn)
- {
- log_.error("Caught exception rolling back transaction", exn);
- }
- // We will need to alert Tomcat of this exception.
- if (ex instanceof RuntimeException)
- throw (RuntimeException) ex;
-
- throw new RuntimeException("loadSession(): failed to load session " +
- realId, ex);
- }
- finally
- {
- try {
- if(doTx)
- {
- 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 {
- if (switcher != null)
- {
- switcher.reset();
- }
- }
- }
+// loadCompleted = true;
+// }
+// catch (Exception ex)
+// {
+// try
+// {
+// // if(doTx)
+// // Let's set it no matter what.
+// batchingManager.setBatchRollbackOnly();
+// }
+// catch (Exception exn)
+// {
+// log_.error("Caught exception rolling back transaction", exn);
+// }
+// // We will need to alert Tomcat of this exception.
+// if (ex instanceof RuntimeException)
+// throw (RuntimeException) ex;
+//
+// throw new RuntimeException("loadSession(): failed to load session " +
+// realId, ex);
+// }
+// finally
+// {
+// try {
+// if(doTx)
+// {
+// 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 {
+// if (switcher != null)
+// {
+// switcher.reset();
+// }
+// }
+// }
if (session != null)
{
More information about the jboss-cvs-commits
mailing list