4 Replies Latest reply on Mar 15, 2012 5:42 AM by sony2006

    Session and MDB pool restritriction in Jboss AS 7.1.0 Final

    sony2006

      Hi,

      How can i restrict the pool size for session and mdbs in Jboss AS 7.1. I am using EJB 2.1.

      Following the post https://community.jboss.org/message/639396#639396 i configured pools in standalone.xml as below.

          

                <session-bean>

                      <stateless>

                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                      </stateless>

                      <stateful default-access-timeout="5000" cache-ref="simple"/>

                      <singleton default-access-timeout="5000"/>

                  </session-bean

                 <mdb>

                      <resource-adapter-ref resource-adapter-name="hornetq-ra"/>

                      <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                  </mdb>

                  <pools>

                      <bean-instance-pools>

                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="10" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="10" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="mdb-strict-single-pool" max-pool-size="1" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                      </bean-instance-pools>

                  </pools>

       

      and in the jboss-ejb3.xml as below.

       

      <jboss xmlns="http://java.sun.com/xml/ns/javaee"

          xmlns:p="urn:ejb-pool:1.0">

          <assembly-descriptor>

              <p:pool>

                  <ejb-name>AsyncDispatcherSequencedMDB</ejb-name>

                  <p:bean-instance-pool-ref>mdb-strict-single-pool</p:bean-instance-pool-ref>

              </p:pool>

          </assembly-descriptor>

      </jboss>

       

       

      But the number of consumers shown in the console for all the queues is 15. ( I dont understand where the 15 came form. Shouldn't it be 10 for all the queues and 1 for the queue to which AsyncDispatcherSequencedMDB listentens to)

       

      B/w how can i monitor session bean pool?

       

       

      Thanks,

      Sony