0 Replies Latest reply on Dec 11, 2006 3:49 PM by Dave Belfer-Shevett

    Modifying threadpool in JMS under 4.0.5 using EJB3 + JEE?

    Dave Belfer-Shevett Newbie

      '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!