tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1156518 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/core/NamingContextListener.java webapps/docs/changelog.xml
Date Thu, 11 Aug 2011 07:38:01 GMT
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<ObjectName> 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 @@
>          <bug>51644</bug>: Fix annotation scanning for contexts with a
>          multi-level context path such as /a/b. (markt)
>        </fix>
> +      <fix>
> +        Unregisters MBean of DataSource when web application stops. (kfujino)
> +      </fix>
>      </changelog>
>    </subsection>
>    <subsection name="Coyote">
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message