5 Replies Latest reply on Jan 24, 2013 11:19 AM by crazycradd

    MDB Pool config will noit allow me to use more the 15 threads

    crazycradd

      I have the following config in my jboss-ejb3.xml config

       

      <assembly-descriptor>
          <p:pool>
              <ejb-name>TaskReceiverMEJB</ejb-name>
              <p:bean-instance-pool-ref>cp-receiver-single-thread-pool</p:bean-instance-pool-ref>
          </p:pool>
          <p:pool>
              <ejb-name>TaskDespatcherMEJB</ejb-name>
              <p:bean-instance-pool-ref>cp-despatcher-single-thread-pool</p:bean-instance-pool-ref>
          </p:pool>
          <p:pool>
              <ejb-name>TaskRunnerMEJB</ejb-name>
              <p:bean-instance-pool-ref>cp-mdb-strict-max-pool</p:bean-instance-pool-ref>
          </p:pool>
      </assembly-descriptor>

       

      and the follwoing set up in standalone.xml

       

              <pools>
                  <bean-instance-pools>
                      <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                      <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                      <strict-max-pool name="cp-mdb-strict-max-pool" max-pool-size="200" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                      <strict-max-pool name="cp-despatcher-single-thread-pool" max-pool-size="1" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                      <strict-max-pool name="cp-receiver-single-thread-pool" max-pool-size="1" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                  </bean-instance-pools>
              </pools>

       

      My reciever and despatcher are running as singletons but the runner is only using 15 threads. I reduced the mdb-strict-max-pool to 10 just to see if this was effecting me but I still got 15

        • 1. Re: MDB Pool config will noit allow me to use more the 15 threads
          jbertram

          The number of MDB instances is only part of the equation here.  You also have to deal with the session pool size used by the HornetQ JCA RA (which defaults to 15).  To configure this use the "maxSession" activation configuration property on your MDB.

           

          Remember, whichever value is lower (either the MDB instance pool size or the JCA RA session pool size) will determine the maximum concurrency of message processing for a particular MDB.

          1 of 1 people found this helpful
          • 2. Re: MDB Pool config will noit allow me to use more the 15 threads
            jbertram

            My reciever and despatcher are running as singletons but the runner is only using 15 threads. I reduced the mdb-strict-max-pool to 10 just to see if this was effecting me but I still got 15

            The way I understand it, this shouldn't happen.  Do you have a test-case I can use to reproduce this?

            • 3. Re: MDB Pool config will noit allow me to use more the 15 threads
              crazycradd

              How do I do this using the descriptor all the examples I can find use annotations to do this.

               

              do I need to use ejb.xml or jboss-ejb3.xml or both ?

              • 4. Re: MDB Pool config will noit allow me to use more the 15 threads
                jbertram

                Activation configuration properties are standard Java EE.  You can use either ejb-jar.xml or jboss-ejb3.xml to configure them.

                • 5. Re: MDB Pool config will noit allow me to use more the 15 threads
                  crazycradd

                  Thanks for your help I have edited jboss-ejb3.xml

                   

                  <message-driven>
                    <ejb-name>TaskRunnerMEJB</ejb-name>
                      <activation-config>
                          <activation-config-property>
                              <activation-config-property-name>destination</activation-config-property-name>
                              <activation-config-property-value>java:/jms/cp/taskRunnerQueue</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                              <activation-config-property-name>maxSession</activation-config-property-name>
                              <activation-config-property-value>100</activation-config-property-value>
                          </activation-config-property>
                      </activation-config>

                   

                  And it seems to be working as I expect