Bug 56369

Summary: BaseModelMBean does not clean-up attributeBroadcaster in removeNotificationListener()
Product: Tomcat 7 Reporter: lorban
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description lorban 2014-04-08 16:07:31 UTC
BaseModelMBean.addNotificationListener() registers the listener on attributeBroadcaster, while BaseModelMBean.removeNotificationListener() fails to clean that up.

The end result is a memory leak that is very apparent when you embed directly in your WAR file jmxremote_optional.jar as the com.sun.jmx.remote.opt.internal.ArrayNotificationBuffer$BufferListener' classloader cannot be garbage collected which end up depleting the perm gen merely after a few redeploys.
Comment 1 Mark Thomas 2014-04-12 20:49:42 UTC
This has been fixed in 8.0.x for 8.0.6 onwards.

This has been fixed in 7.0.x for 7.0.54 onwards.
Comment 2 Konstantin Kolinko 2014-04-13 12:21:45 UTC
I re-filed this at Apache Commons Modeler project as
https://issues.apache.org/jira/browse/MODELER-31

Proposed for Tomcat 6.
Comment 3 Mark Thomas 2014-04-24 08:49:57 UTC
The fix has been applied to 6.0.x and will be included in 6.0.40 onwards.