10 Replies Latest reply on Apr 26, 2003 4:16 PM by kjc5664

    MBean as JMS Message Listener

    kjc5664

      Thanks warjort for the help with this subject. However when I configure
      my bean using the following snipet:


      <mbean code=AQueueHandler" name="user:service=AQueueHandler">
      jboss.mq.destination:service=Queue,name=Queue1
      boss.mq.destination:service=Queue,name=Queue2
      jboss.mq.destination:service=Topic,name=Topic1



      In the JBoss logs I find the messages.

      waiting in start user:service=AQueueHandler on jboss.mq.destination:service=Queue,name=Queue1.
      The same log output is there for Queue2 and Topic1

      In the shell in which I start JBoss. The last message
      received is: MBeans waiting for other mbeans:
      ObjecName: user:service=QueueHandler
      state: CONFIGURED
      I depend on: jboss.mq.destination:service=Queue,name=Queue1
      jboss.mq.destination:service=Queue,name=Queue2
      jboss.mq.destination:service=Topic,name=Topic1

      And, log statements that I placed in the QueueHandler.start()
      method. are never printed.

      The strange thing is. All of the destinations and QueueHandler appear in the JMX console.

      Any help would be greatly appreciated.

        • 1. Re: MBean as JMS Message Listener

          Are you sure there is no exception further up?

          Try setting the logging threshold
          to DEBUG of the file appender in
          server/default/conf/log4j.xml

          You will get extra information in
          server/default/log/server.log

          Regards,
          Adrian

          • 2. Re: MBean as JMS Message Listener
            kjc5664

            Thanks again warjort. This exception was in server.log

            server.log:2003-04-24 15:34:35,973 ERROR [org.jboss.ejb.EntityContainer] Initialization failed
            server.log:2003-04-24 15:35:01,760 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'

            • 3. Re: MBean as JMS Message Listener
              kjc5664

              I forgot to mention that I'm using JBoss-3.2.0RC1

              • 4. Re: MBean as JMS Message Listener

                I doubt the entity bean is the problem
                although it obviously needs resolving.

                You need to get the debug logging to find out
                why your MBean didn't start when queues
                started.

                Regards,
                Adrian

                • 5. Re: MBean as JMS Message Listener
                  kjc5664

                  Thanks once again.

                  I added

                  to log4j.xml in server/all/conf/

                  But, the server.log still shows the same level of output as
                  before. I'm running JBoss with the shell ./run.sh -c all

                  • 6. Re: MBean as JMS Message Listener
                    kjc5664

                    Here is another oddity. In my mbean declaration I commented out
                    all but one of the dependencies. So the declaration now looks like
                    this: <!-- EPPOS Service Configuration -->



                    jboss.mq.destination:service=Queue,name=Queue1
                    <!--
                    boss.mq.destination:service=Queue,name=Queue2
                    jboss.mq.destination:service=Topic,name=Topic1
                    -->




                    With this declaration. My mbean is started. But, Of course there are other
                    exceptions which I fully expected due to the other two JMS components
                    having not been started. The work around that I am going to use. Is
                    to get the RMI adaptor on the client side and use it to invoke a "startListening" method
                    on the mbean. That works. But, It does'nt solve the mystery of why
                    this problem is occuring.

                    Thanks in advance.

                    • 7. Re: MBean as JMS Message Listener

                      I assumed this was a typo before

                      boss.mq.destination:service=Queue,name=Queue2

                      Shouldn't that be
                      jboss.mq.destination:service=Queue,name=Queue2

                      Regards,
                      Adrian

                      • 8. Re: MBean as JMS Message Listener
                        kjc5664

                        Yup. That's a typo. What is did a copyNPaste. I missed the j


                        Thanks again.

                        • 9. Re: MBean as JMS Message Listener
                          kjc5664

                          I have attached debug output that you may find helpful.

                          • 10. Re: MBean as JMS Message Listener
                            kjc5664

                            Andrian, this was a typo in the config file as well. I changed the
                            boss to jboss and all worked as expected. My bad.


                            Thanks again