3 Replies Latest reply on Jan 27, 2011 3:59 AM by Wolf-Dieter Fink

    JBoss MQ Topic and MDBeans

    Scott Venter Newbie

      Hey guys,

       

      Firstly, I have searched the forum and have found MDBean questions posted all over the place (EJB / MQ / EJB3 etc) , so if I have posted to the wrong sub forum, please let me know where this question should go.

       

      I am using JBoss AS 4.2.3 on Solaris 8, with JBossMQ messaging.

       

      I have a single topic to which I have configured 2 MDBeans to connect. When I first start up the server, both beans respond to messages sent to the topic, but after some time goes by, only one of the 2 beans responds.

       

      I have checked the JMX console and both beans are in state 3. It just seems that after a time that the one, (consistently the same one) stops responding to messages. if I restart the server everything is fine again.

       

       

      Any assistance would be greatly appreciated.

       

      Scott.

        • 1. JBoss MQ Topic and MDBeans
          Wolf-Dieter Fink Master

          Hi Scott,

          do you have a clustered environment?

          How your MQ is configured, do you use HSQLDB (this is the default database DefaultDS if you have nothing changed).

          If yes this might be the problem because HSQLDB is not for production and I have seen some strange behaviour with it.

          You should change to Oracle, Mysql or some other. See the examples from docs/examples/...

           

          With 2MDBeans you mean two different implementations as subscriber of a topic?

          Maybe a debug message within the lifecycle methods helps to check ...

          • 2. JBoss MQ Topic and MDBeans
            Scott Venter Newbie

            Hi Wolf-Dieter,

             

            I am runnning JBoss with the default HSQL DB for JMS. I realise that this is not the best way to deal with the messaging inside JBoss and I am busy moving to another dbms.

             

            I have a standard 3 environment setup in which I have a development environment, a user acceptance testing environment and a production environment. I have the same JBoss configuration in all 3 environments, but I am only experiencing this problem in the one environment. I have checked that there is available disk capacity and memory on that machine and the usage is more or less the same as the other 2 environments.

             

            I have 2 MDBeans that perform different functions based on the content of the message posted to the topic. So this is 2 seperate MDBean classes, both configured with activation config as:

             

               activationConfig = {

                     @ActivationConfigProperty(propertyName = "destinationType",propertyValue = "javax.jms.Topic"),

                     @ActivationConfigProperty(propertyName = "destination",propertyValue = "topic/Application_Events"),

                     @ActivationConfigProperty(propertyName = "useDLQ",propertyValue = "true"),

                     @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "type = 'TriggerEvent'"),

                     @ActivationConfigProperty(propertyName = "DLQJNDIName",propertyValue = "queue/DLQ")

                  },

             

            Both beans are configured with this activation config, and after start up, both receive and process messages sent to the topic. However after some time goes by ( could be weeks) bean 2 stops receiving messages and a restart is required of the container.

            • 3. JBoss MQ Topic and MDBeans
              Wolf-Dieter Fink Master

              If you move to a different dbms I suppose the problem disapear.

              Also you might think about upgrade to JBoss 4.3 because of JBossMessaging, but the most important issue to migrate is the cluster feature of JBM.