开发者

Destroy JMS Message Listener

开发者 https://www.devze.com 2022-12-22 10:03 出处:网络
How to开发者_开发知识库 destroy my JMS Message listener ? I tried writing a code to set it to null, but that does not helpCall the close() on the consumer that have the message listener set.

How to开发者_开发知识库 destroy my JMS Message listener ?

I tried writing a code to set it to null, but that does not help


Call the close() on the consumer that have the message listener set.

MessageConsumer consumer = session.createConsumer(destination, selector);
consumer.setMessageListener(listener);
...
/* Listening is working */
...
consumer.close();
/* Listening is NOT working anymore */
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号