2 Replies Latest reply on Nov 24, 2004 1:32 PM by Elias Ross

    Number of Mbean instances in pool

    saleti Newbie


      I am trying to setup the pool to mange number of message bean instances. Can you please me know how i can do it in jboss.

      In Web logic it is done by adding the following to ejb-jar.xml
      <message-driven-descriptor >

      <max-beans-in-free-pool >100</max-beans-in-free-pool >
      <initial-beans-in-free-pool >25</initial-beans-in-free-pool >

      </message-driven-descriptor >


        • 1. Re: Number of Mbean instances in pool
          flindet Newbie

          If you look into conf/standardjboss.xml, you'll find a section on message-driven-bean. In here you can set the MinimumSize and MaximumSize

          Here's a snippet from my file:

           <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->

          I'm pretty new to JBoss, so there may be better ways of doing this. For example, you can change these settings using the jmx-console (look under jboss.j2ee). However, changes done in jmx-console are not permanent. You're settings will return to the default when you next restart JBoss.

          If anyone can add to this, that would be greatly appreciated. For example, I would like to learn more about how we determine exactly how many MDBs are running at a given time.

          • 2. Re: Number of Mbean instances in pool
            Elias Ross Master

            You mean, MDB running the onMessage() method? You can't get an active count AFAIK with JBoss. This MBean will tell you how many there were created:


            You can probably expose a count by creating an MBean and calling it during the onMessage entrance and exit. Or add the feature to JBoss itself and post a patch.