activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r477571 - /incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Date Tue, 21 Nov 2006 08:15:45 GMT
Author: jlim
Date: Tue Nov 21 00:15:44 2006
New Revision: 477571

URL: http://svn.apache.org/viewvc?view=rev&rev=477571
Log:
applied patch for http://issues.apache.org/activemq/browse/AMQ-1029

Modified:
    incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java

Modified: incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?view=diff&rev=477571&r1=477570&r2=477571
==============================================================================
--- incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Tue Nov 21 00:15:44 2006
@@ -1463,10 +1463,19 @@
      */
     protected void startAllConnectors() throws Exception{
         if (!isSlave()){
+        	
+            ArrayList al = new ArrayList();
+            	
             for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
                 TransportConnector connector = (TransportConnector) iter.next();
-                startTransportConnector(connector);
+                al.add(startTransportConnector(connector));
             }
+ 
+            if (al.size()>0) {
+            	//let's clear the transportConnectors list and replace it with the started transportConnector
instances 
+            	this.transportConnectors.clear();
+            	setTransportConnectors(al);
+            }            
 
             for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
                 NetworkConnector connector = (NetworkConnector) iter.next();
@@ -1495,7 +1504,7 @@
         }
     }
 
-    protected void startTransportConnector(TransportConnector connector) throws Exception
{
+    protected TransportConnector startTransportConnector(TransportConnector connector) throws
Exception {
         connector.setBroker(getBroker());
         connector.setBrokerName(getBrokerName());
         connector.setTaskRunnerFactory(getTaskRunnerFactory());
@@ -1508,6 +1517,8 @@
             connector = registerConnectorMBean(connector);
         }        
         connector.start();
+        
+        return connector;
     }
 
     /**



Mime
View raw message