Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 93148 invoked from network); 7 Nov 2006 14:19:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2006 14:19:23 -0000 Received: (qmail 89504 invoked by uid 500); 7 Nov 2006 14:19:34 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 89478 invoked by uid 500); 7 Nov 2006 14:19:34 -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 89469 invoked by uid 99); 7 Nov 2006 14:19:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 06:19:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 06:19:22 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7BC1F71430D for ; Tue, 7 Nov 2006 06:19:02 -0800 (PST) Message-ID: <8912936.1162909142504.JavaMail.root@brutus> Date: Tue, 7 Nov 2006 06:19:02 -0800 (PST) From: "Andreas Mack (JIRA)" To: activemq-dev@geronimo.apache.org Subject: [jira] Created: (AMQ-1029) TransportConnector get duplicated when used with JMX MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org TransportConnector get duplicated when used with JMX ---------------------------------------------------- Key: AMQ-1029 URL: https://issues.apache.org/activemq/browse/AMQ-1029 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 4.0.2 Environment: Linux, ActiveMQ broker in a custom servlet, running on Tomcat 5.5. Reporter: Andreas Mack Priority: Minor Attachments: tc-jmx-patch The BrokerService keeps the configured TransportConnectors in a list called transportConnectors. In startAllConnectors, the list is traversed and each connector is started through startTransportConnector(). This method checks if JMX is configured, and if so, it called connector.asManagedConnector() which returns a new instance of a TransportConnector. This instance is started. But in the transportConnectors list of BrokerService, the old, unstarted object is still existent. Since a TransportConnector starts a TransportServiceDetector thread, the old, unstarted instance contains a TSD that is not active. But the started TSD isn't referenced anymore. On shutdown, the old, unstarted TC and subsequently TSD are stopped. The "lost" instance can't be touched anymore. My patch does this: During spin-up, startTransportConnector() returns the instance that is started. The started instances are collected in an arraylist, this list replaces transportConnectors after startup. Thanks to jstrachan for being patient on irc. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira