Author: kfujino
Date: Thu Apr 21 06:28:58 2016
New Revision: 1740239

URL: http://svn.apache.org/viewvc?rev=1740239&view=rev
Log:
Ensure that clear the channel instance from channel services when stopping 
channel.

Modified:
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java?rev=1740239&r1=1740238&r2=1740239&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
 Thu Apr 21 06:28:58 2016
@@ -246,7 +246,7 @@ public class ChannelCoordinator extends
             }
 
             startLevel = (startLevel & (~svc));
-            
+            channel = null;
         }catch ( Exception x ) {
             throw new ChannelException(x);
         } finally {

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java?rev=1740239&r1=1740238&r2=1740239&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
 Thu Apr 21 06:28:58 2016
@@ -176,6 +176,7 @@ public abstract class ChannelInterceptor
     @Override
     public void stop(int svc) throws ChannelException {
         if (getNext() != null) getNext().stop(svc);
+        channel = null;
     }
     
     @Override

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java?rev=1740239&r1=1740238&r2=1740239&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java
 Thu Apr 21 06:28:58 2016
@@ -457,7 +457,11 @@ public class McastService implements Mem
     @Override
     public void stop(int svc) {
         try  {
-            if ( impl != null && impl.stop(svc) ) impl = null;
+            if ( impl != null && impl.stop(svc) ) {
+                impl.setChannel(null);
+                impl = null;
+                channel = null;
+            }
         } catch ( Exception x)  {
             log.error("Unable to stop the mcast service, level:"+svc+".",x);
         }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java?rev=1740239&r1=1740238&r2=1740239&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java
 Thu Apr 21 06:28:58 2016
@@ -111,6 +111,7 @@ public abstract class ReceiverBase imple
     public void stop() {
         if ( executor != null ) executor.shutdownNow();//ignore left overs
         executor = null;
+        channel = null;
     }
 
     /**

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java?rev=1740239&r1=1740238&r2=1740239&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
 Thu Apr 21 06:28:58 2016
@@ -100,6 +100,7 @@ public class ReplicationTransmitter impl
     @Override
     public synchronized void stop() {
         getTransport().disconnect();
+        channel = null;
     }
 
     /**

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1740239&r1=1740238&r2=1740239&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Apr 21 06:28:58 2016
@@ -137,6 +137,10 @@
         Add the channel name to the thread which is invoked by channel services
         in order to identify the associated channel. (kfujino)
       </add>
+      <fix>
+        Ensure that clear the channel instance from channel services when
+        stopping channel. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to