'Lo folks. We're implementing our first messaging queue, and we need to enforce a
single thread model reading from the queue. We may spin off multiple threads, but there
are many times we need to only read one item from the queue, process it, finish and close,
then pull the next item.
Best situation for that seems to be to modify the Threadpool for queue, specifying only
one thread active at a time. But I can't figure out how to do that the EJB3 JEE way
(remember we have no deployment descriptor for this MBean)
Here's our configuration code for the MDB:
@MessageDriven(activationConfig =
| {
| @ActivationConfigProperty(propertyName="destinationType",
| propertyValue="javax.jms.Queue"),
| @ActivationConfigProperty(propertyName="destination",
| propertyValue="queue/jobs")
| })
Any suggestions? The onMessage() in this MDB is triggering fine, but if we pile 5 items
into the queue, we end up with 5 simultaneously executing threads. Not what we want.
Thanks!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992893#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...