activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r832401 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
Date Tue, 03 Nov 2009 12:25:38 GMT
Author: gtully
Date: Tue Nov  3 12:25:38 2009
New Revision: 832401

URL: http://svn.apache.org/viewvc?rev=832401&view=rev
Log:
avoid java.util.concurrent.RejectedExecutionException on shutdown by bracketing executor usage
with started flag

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java?rev=832401&r1=832400&r2=832401&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
Tue Nov  3 12:25:38 2009
@@ -471,7 +471,7 @@
     }
 
     private void fireServiceRemovedEvent(RemoteBrokerData data) {
-        if (discoveryListener != null) {
+        if (discoveryListener != null && started.get()) {
             final DiscoveryEvent event = new DiscoveryEvent(data.service);
             event.setBrokerName(data.brokerName);
 
@@ -490,7 +490,7 @@
     }
 
     private void fireServiceAddEvent(RemoteBrokerData data) {
-        if (discoveryListener != null) {
+        if (discoveryListener != null && started.get()) {
             final DiscoveryEvent event = new DiscoveryEvent(data.service);
             event.setBrokerName(data.brokerName);
             



Mime
View raw message