8 Replies Latest reply on May 22, 2003 3:23 AM by stephanenicoll

    MDB pool-size

    jayeshpk

      How do I change the pool size for message driven bean?

      Thanks,
      Jayesh

      here is what jboss.xml looks like
      <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
      <instance-cache></instance-cache>
      <persistence-manager></persistence-manager>
      <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
      <container-invoker-conf>
      DefaultJMSProvider
      StdJMSPool
      15
      1
      True
      </container-invoker-conf>
      <container-pool-conf>
      100
      10
      </container-pool-conf>
      </container-configuration>


        • 1. Re: MDB pool-size

          MaximumSize.

          //Peter

          • 2. Re: MDB pool-size
            jayeshpk

            I still don't see 100 instances being created. I have a print in my ejbcreate method.

            Could you please tell me why?

            Thanks,
            Jayesh

            • 3. Re: MDB pool-size
              cepage

              There are two "MaximumSize" entries in the jboss.xml files, and you will want to change the first one (defaulting to 15), in order to change the number of message listeners that are set up in the pool.

              You still will not see ejbCreate() being invoked until the associated listener is actually assigned to service an invocation.

              But don't do this. You will be happier if you override the number of instances on a per-MDB basis. Put the settings in your jboss.xml file, not standardjboss.xml. Here is what my jboss.xml file looks like where I set the pool size to 5.

              <?xml version="1.0"?>

              <container-configurations>
              <container-configuration>
              <container-name>Standard Message Driven Bean</container-name>
              <container-invoker-conf>
              DefaultJMSProvider
              StdJMSPool
              5
              1
              True
              </container-invoker-conf>
              </container-configuration>
              </container-configurations>

              <enterprise-beans>
              <message-driven>
              <ejb-name>AllocateVolumesMDB</ejb-name>
              <destination-jndi-name>queue/allocationsQueue</destination-jndi-name>
              </message-driven>
              </enterprise-beans>



              Good luck,
              Corby

              • 4. Re: MDB pool-size
                jayeshpk

                Thanks Corby.

                • 5. Re: MDB pool-size

                  Anybody knows how to do this with Xdoclet? Let's say I wan to set the size of 10 for my bean XXX

                  Is there an XDoclet tag for that?

                  Thanks

                  • 6. Re: MDB pool-size

                    Anybody knows how to do this with Xdoclet? Let's say I wan to set the size of 10 for my bean XXX

                    Is there an XDoclet tag for that?

                    Thanks

                    • 7. Re: MDB pool-size

                      Container configurations are a merge point.

                      Regards,
                      Adrian

                      • 8. Re: MDB pool-size

                        Excuse me? What do you mean by Container configurations are a merge point?

                        I tought there was a way to specify the pool size of a MDB in the jboss.xml file contained in the EJB JAR file,

                        Is that true?