5 Replies Latest reply on Sep 19, 2006 6:00 AM by sumedh_inamdar

    Pool size for my Stateless Beans?

    pgarvey

      How do I set the minimum and maximum pool size for my Stateless Beans
      in my jboss.xml file? In weblogic 8.1 I am able to do so using <max-beans-in-free-pool>.

      <weblogic-ejb-jar>
      <weblogic-enterprise-bean>
      <ejb-name>SamAccountsEJB</ejb-name>
      <caching-descriptor>
      <max-beans-in-free-pool>100</max-beans-in-free-pool>
      </caching-descriptor>
      <jndi-name>sam/accountshome</jndi-name>
      </weblogic-enterprise-bean>
      </weblogic-ejb-jar>

        • 1. Re: Pool size for my Stateless Beans?
          anil.saldhana

          Standardjboss.xml in the conf dir

          • 2. Re: Pool size for my Stateless Beans?
            darranl

            If you have a look at the application server guide it describes the configuration of the various pools.

            You can configure a pool in the jboss.xml deployment descriptor so your changes are specific to a single bean definition.

            The maximum pool size just specifies the maximum number of beans to pool, if demand is greater more beans will be created but they will be discarded when the request finishes. If you need to make sure that no more than a certain number are in use at any one time you need to switch on strict maximum.

            http://www.jboss.org/products/jbossas/docs

            • 3. Re: Pool size for my Stateless Beans?
              sumedh_inamdar

              How do I switch to strict maximum?

              I searched for this in the JBoss manual, but didn't find anything :(

              • 4. Re: Pool size for my Stateless Beans?
                sumedh_inamdar

                I put this in standardjboss.xml's Standard Message Driven Bean <container-configuration> node...

                <container-pool-conf>
                2
                true
                </container-pool-conf>

                But that is not working...my MDB is happily accepting 4 simultaneous requests and 4 instances are getting created...(I printed thread ID and object ID in onMessage() method, which prints 4 different values)

                I even set this in standardjboss.xml's <invoker-proxy-binding> node...

                1
                2 30000
                1

                But doesn't work :(

                • 5. Re: Pool size for my Stateless Beans?
                  sumedh_inamdar

                  Aha?finally it worked?!!!

                  I tried it yesterday with same setting, but not sure what mistake I was doing.

                  We need to configure MaximumSize in <JBOSS_HOME>\server\default\conf\standardjboss.xml to limit number of threads of MDB.


                  <invoker-proxy-binding>
                  message-driven-bean
                  <invoker-mbean>default</invoker-mbean>
                  <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
                  <proxy-factory-config>
                  DefaultJMSProvider
                  StdJMSPool
                  true
                  <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
                  1
                  2
                  30000
                  1

                  10

                  queue/DLQ
                  10
                  0


                  </proxy-factory-config>
                  </invoker-proxy-binding>