This content has been marked as final.
Show 5 replies
-
1. Re: Best way to pause delivery of messages on a queue
gaohoward Apr 27, 2009 8:19 AM (in response to rnicholson10)Can you name the version of JBoss Messaging?
-
2. Re: Best way to pause delivery of messages on a queue
rnicholson10 Apr 27, 2009 11:32 PM (in response to rnicholson10)1.4.3.GA, comes with the 5.1.0 Beta of AS 5.
-
3. Re: Best way to pause delivery of messages on a queue
gaohoward Apr 28, 2009 12:33 AM (in response to rnicholson10)Not sure about JMSContainerInvokerMBean as I can't find it in JBM code base. Did you try use Connection.stop()?
-
4. Re: Best way to pause delivery of messages on a queue
rnicholson10 Apr 28, 2009 1:04 AM (in response to rnicholson10)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. -
5. Re: Best way to pause delivery of messages on a queue
gaohoward Apr 28, 2009 1:23 AM (in response to rnicholson10)I think the AS forum is also a good place to go as it concerns MDB.