activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r491794 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Date Tue, 02 Jan 2007 13:39:11 GMT
Author: rajdavies
Date: Tue Jan  2 05:39:10 2007
New Revision: 491794

URL: http://svn.apache.org/viewvc?view=rev&rev=491794
Log:
in stop() remove VMTransports after services stopped - to avoid a timing issue with 
discovery spinning up a new instance

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

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?view=diff&rev=491794&r1=491793&r2=491794
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Tue Jan  2 05:39:10 2007
@@ -395,6 +395,7 @@
             
             addShutdownHook();
             log.info("Using Persistence Adapter: " + getPersistenceAdapter());
+            
             if (deleteAllMessagesOnStartup) {
                 deleteAllMessages();
             }
@@ -448,8 +449,7 @@
         stopAllConnectors(stopper);
 
         
-        //remove any VMTransports connected
-        VMTransportFactory.stopped(getBrokerName());
+        
 
 
         stopper.stop(persistenceAdapter);
@@ -476,7 +476,10 @@
             }
             stopper.stop(getManagementContext());
         }
-
+        //remove any VMTransports connected
+        //this has to be done after services are stopped,
+        //to avoid timimg issue with discovery (spinning up a new instance)
+        VMTransportFactory.stopped(getBrokerName());
         log.info("ActiveMQ JMS Message Broker (" + getBrokerName()+", "+brokerId+") stopped");
 
         stopper.throwFirstException();
@@ -1513,6 +1516,7 @@
 
             for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
                 NetworkConnector connector = (NetworkConnector) iter.next();
+                connector.setLocalUri(getVmConnectorURI());
                 connector.setBrokerName(getBrokerName());
                 connector.setDurableDestinations(getBroker().getDurableDestinations());
                 connector.start();



Mime
View raw message