Author: rjung Date: Fri Sep 11 20:51:00 2009 New Revision: 814024 URL: http://svn.apache.org/viewvc?rev=814024&view=rev Log: 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. Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=814024&r1=814023&r2=814024&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Fri Sep 11 20:51:00 2009 @@ -112,7 +112,7 @@ 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 ; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org