Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.0
-
None
-
None
Description
Each ActiveMQConnection has a failoverListenerExecutor, which is initialized using the code
Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory());
Which creates a new ActiveMQThreadFactory and the factory has a ThreadGroup. When ThreadGroups are created, they are added to an array on their parent ThreadGroup. In our testing, the array of ThreadGroups just keeps growing as we keep creating ActiveMQConnections. The problem seems to be that nobody is destroying the ThreadGroups (ThreadGroup.destroy()). Note: the ActiveMQConnection etc are all cleaned up correctly.
I've managed to workaround this issue by caching the ActiveMQConnection but in some environments this might not be possible.