阻止MDB接收消息? [英] Stop MDB from receiving messages?

查看:101
本文介绍了阻止MDB接收消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以编程方式停止消息驱动的bean从JMS队列接收消息.

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

我的环境是WebSphere Application Server v7.

My environment is WebSphere Application Server v7.

我认为可以通过对激活规范MBean进行一些MBean操作来完成,但是我无法使用WebSphere的adminclient API来找到ActivationSpec.

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.

我已经使用JConsole浏览了JMX树,还尝试打印出每个可用的MBean并搜索Activationspec的名称.无处可寻.

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?

可以通过其他任何方式停止MDB吗?

Could the MDB be stopped in any other way?

谢谢!

推荐答案

您需要找到正确的J2CMessageEndpoint并将其停用. 在这里看:

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

尽管第一个链接讨论了wsadmin脚本编制,但是您也可以通过Java代码执行任何操作.

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

这篇关于阻止MDB接收消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆