Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-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 29C767331 for ; Thu, 11 Aug 2011 07:38:26 +0000 (UTC) Received: (qmail 90744 invoked by uid 500); 11 Aug 2011 07:38:24 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 89683 invoked by uid 500); 11 Aug 2011 07:38:18 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 89668 invoked by uid 99); 11 Aug 2011 07:38:16 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 07:38:16 +0000 Received: from localhost (HELO [192.168.23.9]) (127.0.0.1) (smtp-auth username markt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 07:38:15 +0000 Message-ID: <4E4386D9.2030804@apache.org> Date: Thu, 11 Aug 2011 08:38:01 +0100 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r1156518 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/core/NamingContextListener.java webapps/docs/changelog.xml References: <20110811073540.6599D23888CE@eris.apache.org> In-Reply-To: <20110811073540.6599D23888CE@eris.apache.org> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/08/2011 08:35, kfujino@apache.org wrote: > Author: kfujino > Date: Thu Aug 11 07:35:39 2011 > New Revision: 1156518 > > URL: http://svn.apache.org/viewvc?rev=1156518&view=rev > Log: > Unregisters MBean of DataSource when web application stops. This needs to be applied to trunk too. Normally, patches are applied to trunk and then back-ported to 7.0.x, 6.0.x and 5.5.x as required. Mark > > Modified: > tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/NamingContextListener.java > tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml > > Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/NamingContextListener.java > URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/NamingContextListener.java?rev=1156518&r1=1156517&r2=1156518&view=diff > ============================================================================== > --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/NamingContextListener.java (original) > +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/NamingContextListener.java Thu Aug 11 07:35:39 2011 > @@ -23,6 +23,7 @@ import java.beans.PropertyChangeEvent; > import java.beans.PropertyChangeListener; > import java.net.MalformedURLException; > import java.net.URL; > +import java.util.Collection; > import java.util.HashMap; > import java.util.Hashtable; > import java.util.Iterator; > @@ -296,6 +297,13 @@ public class NamingContextListener > } > > ContextAccessController.unsetSecurityToken(getName(), container); > + > + // unregister mbeans. > + Collection names = objectNames.values(); > + for (ObjectName objectName : names) { > + Registry.getRegistry(null, null).unregisterComponent(objectName); > + } > + objectNames.clear(); > > namingContext = null; > envCtx = null; > > Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml > URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1156518&r1=1156517&r2=1156518&view=diff > ============================================================================== > --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) > +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Aug 11 07:35:39 2011 > @@ -64,6 +64,9 @@ > 51644: Fix annotation scanning for contexts with a > multi-level context path such as /a/b. (markt) > > + > + Unregisters MBean of DataSource when web application stops. (kfujino) > + > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org