JBTHR-28 Ensure listener is called when there are running threads during shutdown