Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 3313 invoked from network); 9 Apr 2008 09:47:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Apr 2008 09:47:21 -0000 Received: (qmail 86630 invoked by uid 500); 9 Apr 2008 09:47:21 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 86606 invoked by uid 500); 9 Apr 2008 09:47:21 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 86597 invoked by uid 99); 9 Apr 2008 09:47:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Apr 2008 02:47:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Apr 2008 09:46:38 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BC9F8234C0C4 for ; Wed, 9 Apr 2008 02:44:32 -0700 (PDT) Message-ID: <1868930343.1207734272771.JavaMail.jira@brutus> Date: Wed, 9 Apr 2008 02:44:32 -0700 (PDT) From: "Rob Davies (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQ-1511) Slave starts connectors before master fails In-Reply-To: <11616016.1196717846957.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rob Davies resolved AMQ-1511. ----------------------------- Fix Version/s: 5.1.0 Resolution: Fixed Patch applied in svn revision 646245 > Slave starts connectors before master fails > ------------------------------------------- > > Key: AMQ-1511 > URL: https://issues.apache.org/activemq/browse/AMQ-1511 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 4.1.1 > Reporter: Howard Orner > Assignee: Rob Davies > Fix For: 5.1.0 > > Attachments: patchfile.txt > > > A broker configured as a slave starts its connectors before the the master fails. This is bad because a) The documentation states that this is not the case. b) it shouldn't be the case because you don't want clients to be able to connect to the slave until it takes over as master. > In looking at source, it would appear that the MasterConnector of BrokerService is not started until after all the connections are started in startAllConnection(). Unfortunately, to determine if connections should be started, isSlave() is called which relies on the MasterConnector.start() method being called. > The MasterConnector service start() method needs to be called first before isSlave will work. > See broken code snippet from BrokerService below: > protected void startAllConnectors() throws Exception{ > if (!isSlave()){ // OOPS!!! isSlave asks the MasterConnector if the master is active, but can't until its started > ... > if (services != null) { > for (int i = 0; i < services.length; i++) { > Service service = services[i]; //OOPS, MasterConnector is in this list and the surrounding if relies on it to be started > configureService(service); > service.start(); //OOPS!!!! this should have been called for isSlave() to return the right answer. > } > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.