Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A21EFD2D4 for ; Sat, 8 Sep 2012 09:47:08 +0000 (UTC) Received: (qmail 86044 invoked by uid 500); 8 Sep 2012 09:47:08 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 85852 invoked by uid 500); 8 Sep 2012 09:47:08 -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 85825 invoked by uid 99); 8 Sep 2012 09:47:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Sep 2012 09:47:07 +0000 Date: Sat, 8 Sep 2012 20:47:07 +1100 (NCT) From: "Claus Ibsen (JIRA)" To: dev@activemq.apache.org Message-ID: <33658645.53992.1347097627681.JavaMail.jiratomcat@arcas> In-Reply-To: <2040203857.27718.1334562527335.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (AMQ-3807) MBeans are not unregistered under WebSphere MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-3807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated AMQ-3807: ----------------------------- Component/s: Broker Fix Version/s: 5.7.0 Assignee: Claus Ibsen > MBeans are not unregistered under WebSphere > ------------------------------------------- > > Key: AMQ-3807 > URL: https://issues.apache.org/jira/browse/AMQ-3807 > Project: ActiveMQ > Issue Type: Bug > Components: Broker, JMX > Environment: WebSphere 7 > Reporter: christian ohr > Assignee: Claus Ibsen > Priority: Minor > Fix For: 5.7.0 > > Attachments: ManagementContext.patch > > > When running ActiveMQ in embedded mode under WebSphere (I know that this is not a typical JEE-compliant deployment) the ObjectNames of the registered MBeans are modified by the container. Unfortunately, ActiveMQ fails to keep these names. As a result, ActiveMQ does not unregister its beans when an application is stopped, and a restart causes InstanceAlreadyExistExceptions. > The following change to ManagementContext.java may help: > Currently: > {code} > public ObjectInstance registerMBean(Object bean, ObjectName name) throws Exception { > ObjectInstance result = getMBeanServer().registerMBean(bean, name); > this.registeredMBeanNames.add(name); > return result; > } > {code} > but it should be something like: > {code} > public ObjectInstance registerMBean(Object bean, ObjectName name) throws Exception { > ObjectInstance result = getMBeanServer().registerMBean(bean, name); > if (result != null) this.registeredMBeanNames.add(result.getObjectName); > return result; > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira