activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r813980 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker: BrokerService.java ft/MasterConnector.java
Date Fri, 11 Sep 2009 18:49:23 GMT
Author: rajdavies
Date: Fri Sep 11 18:49:23 2009
New Revision: 813980

URL: http://svn.apache.org/viewvc?rev=813980&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1813

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=813980&r1=813979&r2=813980&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Fri Sep 11 18:49:23 2009
@@ -465,7 +465,7 @@
                     service.start();
                 }
             }
-            if (!isSlave()) {
+            if (!isSlave() && (this.masterConnector == null || isShutdownOnMasterFailure()
== false)) {
                 startAllConnectors();
             }
             if (!stopped.get()) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java?rev=813980&r1=813979&r2=813980&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java
Fri Sep 11 18:49:23 2009
@@ -74,6 +74,7 @@
     private final AtomicBoolean masterActive = new AtomicBoolean();
     private BrokerInfo brokerInfo;
     private boolean firstConnection=true;
+    private boolean failedToStart;
 
     public MasterConnector() {
     }
@@ -185,6 +186,7 @@
             }else{
             	LOG.info("Slave stopped before connected to the master.");
             }
+            setFailedToStart(true);
         }    
     }
 
@@ -348,4 +350,20 @@
 		return stoppedBeforeStart.get();
 	}
 
+    /**
+     * Get the failedToStart
+     * @return the failedToStart
+     */
+    public boolean isFailedToStart() {
+        return this.failedToStart;
+    }
+
+    /**
+     * Set the failedToStart
+     * @param failedToStart the failedToStart to set
+     */
+    public void setFailedToStart(boolean failedToStart) {
+        this.failedToStart = failedToStart;
+    }
+
 }



Mime
View raw message