4 Replies Latest reply on Nov 22, 2010 10:46 PM by pankaj.hotwani

    Unable to deploy mdb-bmt example..

    pankaj.hotwani

      Hi,

       

      I have been trying this since quite some time now. I would like my hornet queue to be bound with an MDB. But MDB is not picking up a message from queue.

       

      After many attempts, I thought to try the sample mdb-bmt example of hornetQ. Even in the sample app, MDB doesn't seem to pick up the message from the testQueue. I can see the message is getting sent. But I don't see any output appearing on JBoss Application Server console like the following

       

      message This is a text message received

       

      I am using the following environment:

       

      OS : Windows XP.

      App Server: JBoss 5.1.0 GA

      HornetQ version: 2.1.1

       

      I tried to perform the following steps to run the sample mdb example.

       

      1) Created the 'default-with-hornet' profile by running the %hornetQ%/config/jboss-as-5. This created two new profiles under my %JBOSS_HOME%/server named as 'default-with-hornetq' and 'all-with-hornetq'.

       

      2) copied the 'hornetq-configuration.xml' and 'hornetq-jms.xml' of the sample project to %JBOSS_HOME%/server/default-with-hornetq/deploy/hornetq.sar/

       

      3) ran the jboss server by running the command: run -c default-with-hornetq

       

      4) Ran the sample project by doing 'ant'. I see the following output while running the sample example:

       

      runExample:
           [java] Sent message: This is a text message

      runExample:

           [java] Sent message: This is a text message

       

      But as said, I cannot see any output on the JBoss console.

       

      I would appreciate if anyone can help me in making the sample MDB application run correctly.

       

      Regards,

      Pankaj.

        • 1. Re: Unable to deploy mdb-bmt example..
          clebert.suconic

          Can you try with trunk?

          • 2. Re: Unable to deploy mdb-bmt example..
            pankaj.hotwani

            Even running the example from trunk produces the same problem...

             

            Any urgent help on this would be greatly appreciated. I am really stuck on this since past few days..

            • 3. Re: Unable to deploy mdb-bmt example..
              clebert.suconic

              you're probably starting the example in a wrong way...

               

              start the server using "./build.sh deploy", and then on a different window use ./build.sh

               

               

              look at the readme.html for the example and follow the instructions

              • 4. Re: Unable to deploy mdb-bmt example..
                pankaj.hotwani

                Thanks!

                 

                Got it working. I required to first deploy the mdb example by saying 'ant deploy'. This created a new profile named as 'mdb-bmt-example-profile' and started the jboss with this new profile. Now, I could see the mdb picking up the message on the jboss console.

                 

                Also, I could resolve the issue in my original application where MDB was not picking up the issue. It was a real small problem but it got my head screwed up since last 3 days. I spent nights but couldn't notice the problem until I tried to put the sample mdb under my application. The problem was:

                 

                I was using org.jboss.annotation.ejb.ResourceAdapter while defining the ejb3 annotations for the MDB. Using org.jboss.ejb3.annotation.ResourceAdapter resolved the problem.

                 

                Thanks again!