Question
Is it possible to stop a Message Driven Bean (programmatically), so that it doesn't consume new messages, but processes running transactions as usual?
(This is a follow up of How to stop message processing before undeploying?).
Given
- JBoss 4.2.3 with JBoss Messaging
- a Message Driven Bean according to EJB 2.0
Failed Attempts
- I'd like to use the MBean method
stopDelivery
, but sadly it closes transactions immediately (see bug #EJBTHREE-1870) and thereby causes a lot of exceptions. - I tried to reduce the max pool size to 0 in the JMX console, but the number of active sessions isn't affected at all.
- I could stop the queue, but than I have to handle
NameNotFoundException
s within the producers.