Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 34638 invoked from network); 21 Jul 2006 08:33:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 08:33:46 -0000 Received: (qmail 72365 invoked by uid 500); 21 Jul 2006 08:33:45 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 72263 invoked by uid 500); 21 Jul 2006 08:33:45 -0000 Mailing-List: contact activemq-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-dev@geronimo.apache.org Received: (qmail 72253 invoked by uid 99); 21 Jul 2006 08:33:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 01:33:45 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of james.strachan@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 01:33:44 -0700 Received: by ug-out-1314.google.com with SMTP id m2so1236368uge for ; Fri, 21 Jul 2006 01:33:23 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=lONGndYnhgnbnZngUQTejmFz1yREBm8rfcHR6WwHr/sWS2fGC5HUOwvChUu4rmD42lHTVkc/+7Q0bw1kIpFwWumGlGVxmqehiT8tS+tMpW9TuIn4TsDdPQvvgeDhZGxSzkFbH9QwvBpghxtFprucC2M4YA58RWtkRdX9hbZO7+c= Received: by 10.78.164.13 with SMTP id m13mr187094hue; Fri, 21 Jul 2006 01:33:23 -0700 (PDT) Received: by 10.78.174.8 with HTTP; Fri, 21 Jul 2006 01:33:23 -0700 (PDT) Message-ID: Date: Fri, 21 Jul 2006 09:33:23 +0100 From: "James Strachan" To: activemq-dev@geronimo.apache.org Subject: anyone any idea why RegionBroker.removeConnection() works as it does? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N in http://rafb.net/paste/results/h7qOVA70.html there's // we may be removing the duplicate connection, not the first connection to be created if (oldValue == info) { I'm just wondering about the == operator here. I guess the issue is that a duplicate tries to add a connection, gets a failure then tries to remove itself and we want to guard against the original connection being removed right? Am wondering if it might be better to check for equal connectionId's instead as I could see cases where oldValue != info but they are the same connection? This line of code could mybe be the cause of some duplicate clientID exceptions some folks have experienced from time to time. -- James ------- http://radio.weblogs.com/0112098/