So question is how to temporary stop and start a jms listener created using spring using the fallowing way :
Yes thats do the trick.
DefaultMessageListenerContainer exampleProductsMessageListener= Registry.getApplicationContext().getBean("exampleProductsMessageListener", DefaultMessageListenerContainer.class); exampleProductsMessageListener.stop();