Stop MDB from receiving messages?

谁说我不能喝 提交于 2019-12-23 17:20:56

问题


I need to programmatically stop a Message-driven bean from receiving messages from a JMS queue.

My environment is WebSphere Application Server v7.

I think it could be done by some MBean operation on an Activation Specification MBean, but I can't locate the activationSpec using WebSphere's adminclient API.

I've browsed the JMX tree using JConsole and also tried printing out every available MBean and searching for the name of the activationspec. It's nowhere to be found.

Is this the right approach and what am I missing?

Could the MDB be stopped in any other way?

Thanks!


回答1:


You need to find the right J2CMessageEndpoint and deactivate it. Look here :

Managing the message endpoint lifecycle using wsadmin scripting

J2CMessageEndpoint MBean

Although the first link talks about wsadmin scripting you can do anything from java code as well.



来源:https://stackoverflow.com/questions/8819169/stop-mdb-from-receiving-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!