[jboss-cvs] JBossAS SVN: r105119 - 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 23:46:57 EDT 2010
Author: bstansberry at jboss.com
Date: 2010-05-21 23:46:56 -0400 (Fri, 21 May 2010)
New Revision: 105119
Modified:
trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java
Log:
[JBAS-8043] Clean out commented out code
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 03:44:48 UTC (rev 105118)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java 2010-05-22 03:46:56 UTC (rev 105119)
@@ -2107,105 +2107,25 @@
// some one else loaded this
return session;
}
-
-// 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_);
- IncomingDistributableSessionData data = proxy_.getSessionData(realId, initialLoad);
- if (data != null)
- {
- session.update(data);
- }
- else
- {
- // Clunky; we set the session variable to null to indicate
- // no data so move on
- session = null;
- }
-
- if (session != null)
- {
- ClusteredSessionNotificationCause cause = passivated ? ClusteredSessionNotificationCause.ACTIVATION
- : ClusteredSessionNotificationCause.FAILOVER;
- 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();
-// }
-// }
-// }
+ IncomingDistributableSessionData data = proxy_.getSessionData(realId, initialLoad);
+ if (data != null)
+ {
+ session.update(data);
+ }
+ else
+ {
+ // Clunky; we set the session variable to null to indicate
+ // no data so move on
+ session = null;
+ }
+
+ if (session != null)
+ {
+ ClusteredSessionNotificationCause cause = passivated ? ClusteredSessionNotificationCause.ACTIVATION
+ : ClusteredSessionNotificationCause.FAILOVER;
+ session.notifyDidActivate(cause);
+ }
if (session != null)
{
More information about the jboss-cvs-commits
mailing list