[
https://issues.jboss.org/browse/JGRP-1410?page=com.atlassian.jira.plugin....
]
Sei Syvalta commented on JGRP-1410:
-----------------------------------
JGroups creates that ThreadGroup so it would be good if JGroups would destroy (and thus
unregister it from the parent) at the time of shutdown. I guess it's not so
straighforward to do that. Some alternatives that come to my mind:
- have distinct ThreadGroup per JChannel and destroy the ThreadGroup when the JChannel is
shut down.
- keep count of JChannel instances and at channel shutdown check if the channel to be shut
down is the last one and destroy the ThreadGroup if it is. ThreadGroup creation would also
need to be changed. This would also require some synchronization.
globalThreadGroup not destroyed creates a classloader memory leak
-----------------------------------------------------------------
Key: JGRP-1410
URL:
https://issues.jboss.org/browse/JGRP-1410
Project: JGroups
Issue Type: Bug
Affects Versions: 3.0.1
Environment: linux w/ java 1.6
Reporter: Jean-Philippe Gariepy
Assignee: Bela Ban
Fix For: 3.1
When all channels are closed, the globalThreadGroup is not destroyed. For a normal (i.e.
non-web) application, this is not a problem since the process will exit anyway. However,
for a Java Enterprise web application, this causes a classloader memory leak since the
ThreadGroup object has strong references to JGroups instances having strong references to
their class object having strong reference to their class loader. Since the class loader
is pointed by strong references, the it cannot be garbage collected and hence a leak is
created each time the web application is stopped.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira