[jboss-user] [JBoss Messaging] - Re: Best way to pause delivery of messages on a queue
rnicholson10
do-not-reply at jboss.com
Tue Apr 28 01:04:45 EDT 2009
I'm using MDB's so I won't have direct access to the connection.
I simply want the MDB to stop firing onMessage until I tell the queue to start delivering again (without stopping clients from sending messages to the queue).
I have the following code for JMSContainerInvokerMBean (it's in the package (org.jboss.ejb.plugins.jms):
| MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
| JMSContainerInvokerMBean invoker;
| try
| {
| invoker = (JMSContainerInvokerMBean) MBeanProxy.get(
| JMSContainerInvokerMBean.class, objectName, mbeanServer);
| if (method == STOP)
| {
| invoker.stopDelivery();
| }
| else if (method == START)
| {
| invoker.startDelivery();
| }
| }
| catch( Exception e)
| {
| e.printStackTrace();
| }
|
Would the JMX forum be a better place to ask this question? Unfortunately the documentation is not very informative concerning the method calls above.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227140#4227140
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227140
More information about the jboss-user
mailing list