I'm confused. Don't get your question clearly. Irrespective of the attached consumers, you can stop any given destination. Are you trying to stop mdbs?
I'm trying to stop processing of messages... so let's say that I've sent 20 messages to queue A... it has an business error and has to 'stop' processing of the remaining 19 messages until the business issue is resolved. What I'm trying to do is keep the queue from executing the remaining 19 messages until I say "go".
I tested this 'concept' with twiddle using JBoss 4.0.4 and EJB2, by calling the stopDelivery/startDelivery methods on the org.jboss.ejb.plugins.jms.JMSContainerInvoker mbean for the queue in context.
The problem I'm having is I don't have an invoker for any of my MDBs which deployed by the EJB3 deployer... MDBs deployed by EJBDeployer have an invoker mbean associted with them, EJB3 deployed mdbs do not.
Now one difference is that the EJB 2 MDBs are packaged in a jar file and in the deploy directory. The EJB 3 MDBs are in jar which is packaged in a sar file - could that make a difference?
Well it doesn't appear to be the fact that the MDBs are in a jar which is bundled inside a sar... deployment was exactly the same.
Well this explains a lot...
Please note that this procedure applies for JBoss MQ. For JBoss Messaging substitute "jboss.messaging" for "jboss.mq" and "XAConnectionFactory?" for "UIL2XAConnectionFactory"
Note: These instructions are for EJB 2.1 MDBs and not for EJB3 MDBs. The invoker proxy binding is no longer functional for ejb3.
TODO: Put in EJB3 instructions