5 Replies Latest reply on Sep 8, 2011 3:49 AM by Harry P.

    Configure MDB PoolSize

    Alexander Hartner Expert

      I would like to increase the default number of MDBs per pool. Using the jmx-console I found that the MaxPoolSize is set to 15. I have tried making various changes to ./conf/standardjboss.xml however none have allowed me to increase the number of MDB instances in my pool. I have found this http://www.jboss.org/ejb3/docs/reference/build/reference/en/html/session-bean-config.html, but I am hoping for easier way to increase my global default pool size.


      I know about using annotations, but I want to set the global pool size for all MDBs. This is for two reasons:


      1.) I want to be able to change my pool size without having to reconfigure / redeploy my application

      2.) Change all MDBs in one central place



      Thanks in advance.


        • 1. Re: Configure MDB PoolSize
          jaikiran pai Master

          This is more of a EJB3 question and would be better in the EJB3 user forum. Which version of JBoss AS do you use?

          • 2. Re: Configure MDB PoolSize
            Alexander Hartner Expert

            I will raise it on that forum as well. I am using 4.2.3 with JBM 1.4.2-SP1




            • 3. Re: Configure MDB PoolSize
              jaikiran pai Master

              ejb3workshop wrote:


              I will raise it on that forum as well.

              Don't worry, some moderator will move this thread there.


              I am using 4.2.3 with JBM 1.4.2-SP1




              You can change the value in JBOSS_HOME/server/< servername>/deploy/ejb3-interceptors-aop.xml:


              <domain name="Message Driven Bean">
                    <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
                       <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
                    <bind pointcut="execution(public * *->*(..))">
                       <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
                       <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
                       <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
                       <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
                       <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
                    <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
                       @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=15, timeout=10000)



              Change the maxSize value (default=15) to a value of your choice

              • 4. Re: Configure MDB PoolSize
                Alexander Hartner Expert
                Thanks, just what I was looking for.
                • 5. Re: Configure MDB PoolSize
                  Harry P. Newbie

                  Hi jaikiran,


                                  i want to use concurrency using JMS so i used topic implementation of JMS.

                  My standardjboss.xml is



                          <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
                          <MaximumSize>2</MaximumSize><!--how many parellel need for FPM -->



                  Concurrency is achieved. But the problem is that concurrency is applied to a fixed no of messages after that remaining messages are taken sequentially.



                  No. of messages on topic(range)                             Connecurrency performed for message                         Sequential

                                   11-15                                                                       4 (2 parellel)                                                 7-11

                                  21-24                                                                       10(5 parellel)                                                11-15

                                  25-29                                                                       18(9 parellel)                                                7-11

                                  35-40                                                                       34(17 perellel- best perf.)                              1-6



                  do you know why such pattern is followed & can we restrict it.



                  Thanks in Advance.