Author: rjung Date: Tue Aug 24 12:21:01 2010 New Revision: 988503 URL: http://svn.apache.org/viewvc?rev=988503&view=rev Log: Remove unneeded cast and make ReplicationValve volatile in the DeltaManager.
Backport of r937325 and r939130 from trunk. Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=988503&r1=988502&r2=988503&view=diff ============================================================================== --- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original) +++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Tue Aug 24 12:21:01 2010 @@ -32,6 +32,10 @@ <section name="Tomcat OACC 0.1 (rjung)"> <subsection name="Cluster"> <fix> + Remove unneeded cast and make ReplicationValve volatile + in the DeltaManager. (rjung) + </fix> + <fix> Remove empty implementations of methods no longer existing in the Cluster interface. (rjung) </fix> Modified: tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java?rev=988503&r1=988502&r2=988503&view=diff ============================================================================== --- tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java (original) +++ tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java Tue Aug 24 12:21:01 2010 @@ -101,7 +101,7 @@ public class DeltaManager extends Cluste /** * cached replication valve cluster container! */ - private ReplicationValve replicationValve = null ; + private volatile ReplicationValve replicationValve = null ; /** * The lifecycle event support for this component. @@ -1074,9 +1074,9 @@ public class DeltaManager extends Cluste protected void registerSessionAtReplicationValve(DeltaSession session) { if(replicationValve == null) { if(container instanceof StandardContext && ((StandardContext)container).getCrossContext()) { - Cluster cluster = getCluster() ; - if(cluster != null && cluster instanceof CatalinaCluster) { - Valve[] valves = ((CatalinaCluster)cluster).getValves(); + CatalinaCluster cluster = getCluster() ; + if(cluster != null) { + Valve[] valves = cluster.getValves(); if(valves != null && valves.length > 0) { for(int i=0; replicationValve == null && i < valves.length ; i++ ){ if(valves[i] instanceof ReplicationValve) replicationValve = (ReplicationValve)valves[i] ; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org