1 Reply Latest reply on Jun 5, 2012 4:56 PM by Justin Bertram

    MDB pool size problem?

    Eric Chow Apprentice

      Hello,

       

      I create a MDB named MyMDB to monitor the JMS queue.

      If I send a large of message to that queue, there will be a large of instance of that MDB started.

      How can I control only one MyMDB instance starts to handle the message?

      My idea is to use only one thread to handle all the message one by one.

       

       

      Please teach me how can I config it in JBoss7.

       

      Best regards,

      Eric

        • 1. Re: MDB pool size problem?
          Justin Bertram Master

          You should configure the MDB with the appropriate MaxSession activation configuration property.  In this case, it would be "1".  For example:

           

          @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1") 

           

          That will ensure there is only 1 JMS session used to consume messages.