2 Replies Latest reply on May 26, 2003 7:30 AM by adrian.brock

    creating only one instance of a mdb does not work!

    jotsetung

      hi
      i configured the mdb pool in the jboss.xml with:


      <enterprise-beans>
      <message-driven>
      <ejb-name>myMDB</ejb-name>
      <configuration-name>Standard Message Driven Bean</configuration-name>
      <destination-jndi-name>queue/myQueue</destination-jndi-name>
      <mdb-user>userName</mdb-user>
      <mdb-passwd>password</mdb-passwd>
      </message-driven>
      </enterprise-beans>

      <container-configurations>
      <container-configuration extends="Standard Message Driven Bean">
      <container-name>Standard Message Driven Bean</container-name>
      <container-pool-conf>
      1
      true
      </container-pool-conf>
      </container-configuration>
      </container-configurations>


      but it seems not to work. is it correct to set the configurations for the "Standard Message Driven Bean" ? or what other possibilities are there to limit jboss that only one mdb calculates (executes the onMessage method) at one time.

        • 1. Re: creating only one instance of a mdb does not work!
          rudifr

          Hi,
          I made the same experience as you. The proposed configuration in jboss.xml doesn't work. I am using JBoss 3.21.

          If I change the MaximumSize of StdJMSPool in standardjboss.xml I can limit the mdb instances to one:
          <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
          <!--MaximumSize>15</MaximumSize-->
          1
          1

          10

          queue/DLQ
          10
          0


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

          This seems to work, but I'd like more to do this in jboss.xml for a specific MDB.

          regards,
          Rudi.

          • 2. Re: creating only one instance of a mdb does not work!

            You can configure <invoker-proxy-bindings>
            in jboss.xml and reference them from your beans.

            Regards,
            Adrian