I have an MBean that services a JMS queue. In it I create a MessageConsumer and set my object as the message listener. When I undeploy the MBean one of the threads created during the execution of the Session.createConsumer() method never goes away. I paused the thread in eclipse and I see that it is in the QueuedExecutor$RunLoop(). Shouldn't all the threads created by a service go away when that service is undeployed?
Each time I redploy then undeploy the service it leaves one more of these threads. They seem to be stuck in the wait() method. Is there some other cleanup besides MessageConsumer.close() that I need to call?