fix JMX listener to allow clean reloading of the context