From aa969e556dcf679a49fbc964648665aae18a1fa6 Mon Sep 17 00:00:00 2001 From: rjung Date: Fri, 11 Sep 2009 20:51:00 +0000 Subject: [PATCH] Switch to volatile for status flag used by multiple threads during cluster context startup. Without volatile problems have been observed, where the change by one thread was actually not seen by the other thread. Performance implications are neglectable, because the variable is only used during context startup. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@814024 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/ha/session/DeltaManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/ha/session/DeltaManager.java b/java/org/apache/catalina/ha/session/DeltaManager.java index 8bf7b9891..3eeab7787 100644 --- a/java/org/apache/catalina/ha/session/DeltaManager.java +++ b/java/org/apache/catalina/ha/session/DeltaManager.java @@ -112,7 +112,7 @@ public class DeltaManager extends ClusterManagerBase{ private boolean expireSessionsOnShutdown = false; private boolean notifyListenersOnReplication = true; private boolean notifySessionListenersOnReplication = true; - private boolean stateTransfered = false ; + private volatile boolean stateTransfered = false ; private int stateTransferTimeout = 60; private boolean sendAllSessions = true; private boolean sendClusterDomainOnly = true ; -- 2.11.0