activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r376048 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
Date Wed, 08 Feb 2006 20:25:19 GMT
Author: chirino
Date: Wed Feb  8 12:24:52 2006
New Revision: 376048

URL: http://svn.apache.org/viewcvs?rev=376048&view=rev
Log:
Added some better logging.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java?rev=376048&r1=376047&r2=376048&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
Wed Feb  8 12:24:52 2006
@@ -36,6 +36,7 @@
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportListener;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.activemq.util.ServiceStopper;
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -193,6 +194,7 @@
                         
                         URI uri = fanoutHandler.uri;
                         try {
+                            log.debug("Stopped: "+this);
                             log.debug("Attempting connect to: " + uri);
                             Transport t = TransportFactory.compositeConnect(uri);
                             log.debug("Connection established");
@@ -273,18 +275,24 @@
 
     public void stop() throws Exception {
         synchronized (reconnectMutex) {
-            log.debug("Stopped.");
+        	ServiceStopper ss = new ServiceStopper();
+        	
             if (!started)
                 return;
             started = false;
             disposed = true;
-
+            
+            reconnectTask.shutdown();
+            
             for (Iterator iter = transports.iterator(); iter.hasNext();) {
                 FanoutTransportHandler th = (FanoutTransportHandler) iter.next();
                 if( th.transport != null ) {
-                    th.transport.stop();
+                	ss.stop(th.transport);
                 }
             }
+            
+            log.debug("Stopped: "+this);
+            ss.throwFirstException();
         }
     }
 



Mime
View raw message