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

    Number of Mbean instances in pool

    saleti Newbie

      Hi,

      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 >

      Thanks.


        • 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:

          <invoker-proxy-binding>
           <name>message-driven-bean</name>
           <invoker-mbean>default</invoker-mbean>
           <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
           <proxy-factory-config>
           <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
           <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
           <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
           <MinimumSize>1</MinimumSize>
           <MaximumSize>15</MaximumSize>
           <KeepAliveMillis>30000</KeepAliveMillis>
           <MaxMessages>1</MaxMessages>
           <MDBConfig>
           <ReconnectIntervalSec>10</ReconnectIntervalSec>
           <DLQConfig>
           <DestinationQueue>queue/DLQ</DestinationQueue>
           <MaxTimesRedelivered>10</MaxTimesRedelivered>
           <TimeToLive>0</TimeToLive>
           </DLQConfig>
           </MDBConfig>
           </proxy-factory-config>
          


          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:

            jboss.j2ee:jndiName=local/MyBean,plugin=pool,service=EJB

            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.