开发者

Destroy JMS Message Listener

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜