3 Replies Latest reply on Feb 6, 2004 6:48 AM by Joerg Thoennes

    How to create only on instance of a MDB in jboss 3.2.1

    rtr Newbie

      hi,

      I would like to configure jboss to create only one instance of a MDB. The answers I have found here so far refer to the entry

      <container-configuration>
      <container-name>Standard Message Driven Bean</container-name>
      <container-invoker-conf>

      in the standardjboss.xml. this entry doen's exist in 3.2.1. I have found an entry called

      <container-configuration>
      <container-name>Standard Message Driven Bean</container-name>
      <container-pool-conf>

      in the standardjboss.xml and i have changed the default value from 100 to 1. unfortunately this doesn't have any effect. my system.outs show me, that there are still multiple instances working in parallel. is this a bug or am i changing the wrong entry?

      any help is highly appreciated.

      thanks, robert

        • 1. Re: How to create only on instance of a MDB in jboss 3.2.1
          Joerg Thoennes Newbie

          Hi Robert,

          yes, there are two entries where you may configure this. And this also confused me;
          see my thread

          http://www.jboss.org/index.html?module=bb&op=viewtopic&t=43183

          But from the answers I got in the forums the correct place is

           <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>
          ...
           </proxy-factory-config>
           </invoker-proxy-binding>
          


          Here please configure MaximumSize to 1. See the JBoss 3.2.2 book:


          For the JMS specific proxy factory, org.jboss.ejb.plugins.jms.JMSContainerInvoker, there is an MDBConfig "MaximumSize: This specifies the upper limit to the number of concurrent MDBs that will be allowed for the JMS destination associated with a given MDB deployment. This defaults to 15.


          The container configuration of the MDB is tied by the name "message-driven-bean" to this invoker.

          The descriptions of the DTDs in

          docs/dtd/html-svg/jboss_3_2_dtd/index.html

          is IMHO somewhat misleading:

          The capacity of the Pool. For pools where reclaim is possible, the pool will also be repopulated when the instance is free to be reused. This is not an hard limit, if instances are needed when the pool is at its MaximumSize, new instances will be created following the demand unless a strictMaximumSize of true is specified. Used in: container-pool-conf and invoker-proxy-conf for JMSContainerInvoker


          The strictMaximumSize is not applicable here.

          You can also make this configuration local to your MDB by supplying an own container-configuration in you META-INF/jboss.xml file.

          Please post if this give the expected results. I am still a little bit unsure about this.

          HTH

          Cheers, Joerg


          • 2. Re: How to create only on instance of a MDB in jboss 3.2.1
            rtr Newbie

            it worked. thanks a lot for the quick reply.

            robert

            • 3. Re: How to create only on instance of a MDB in jboss 3.2.1
              Joerg Thoennes Newbie

              Robert,

              would you like to try it as a per container config?

              Joerg