3 Replies Latest reply on Dec 10, 2004 11:35 AM by genman

    MDB single instance configuration confusion

    thoennes

      Hi all,

      in our software we have the requirement to process all JMS message in sequence. Since allowing several MDBs to read from the same JMS queue would potentially generate race conditions for us, we simply set the following XML attributes in standardjboss.xml

      1
      true


      This approach is quite brute force, but it seemed to work. (From the training, we now know, that we could set this per MDB...)

      We do this since 3.0.4, but trying out 3.2.2, the race condition re-appeared and we re-checked the configuration.

      Now I found that the MaximumSize appears in the

      <container-invoker-conf>
      ...
      </container-invoker-conf>


      element and in the

      <container-pool-conf>
      ...
      </container-pool-conf>


      element. The DTD allows the strictMaximumSize only in the 2nd element, but we applied the setting to the 1st element. But JBoss did not report any error.

      Is the DTD wrong or not checked?

      Where is the correct place to configure the concurrency:
      container-pool-conf or container-invoker-conf?


      Actually, the races are not so easy to reproduce, so I would not like to rely on experiments, but on experts advice.

      Thanks, Joerg

        • 1. Re: MDB single instance configuration confusion
          ricardom

          We had the opposite problem here, we needed to enlarge the number
          of concurrent beans and found the following solution.
          This might help you if you set the value to one.

          For myself I would be interested how to change this value for special
          messagebean only and not for the whole jboss.


          How To enlarge Maximum Number of Messages in standardjboss.xml :

          Change 15 to a higher value.


          <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
          15
          1

          10

          queue/DLQ
          10
          0


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


          • 2. Re: MDB single instance configuration confusion
            kavitha31


            We are trying to create multiple instances of the MDB for the requests in the Oracle Request Queue.We are using Jboss4.0 with Oracle AQ.As suggested above ,when we set the STdJMSPool MaximumSize under the <invoker-proxy-binding> attribute to 100 (from 1) we get the following error


            oracle.jms.AQjmsException JMS-106 Cannot have more than one open Session on a JMSConnection
            Is this an issue with Oracle AQ or should we configure the concurrent beans setting elsewhere?

            Please treat this as urgent.Thank you

            • 3. Re: MDB single instance configuration confusion
              genman

              If you use a newer version of JBoss, it has a singleton conf. built in. Refer to FAQ and Wiki