3 Replies Latest reply on Apr 1, 2014 12:59 AM by arul_soft2002

    MDB Not Listening in JBoss 5.1 with HornetQ 2.2.5

    arul_soft2002

      Dear All,

       

           I've installed HornetQ 2.2.5 in JBoss 5.1 GA server(Windows 7 & Java 1.6).Im trying to achieve a simple Message producer and consumer example in this server setup (Refer attached sources and log).I'm sending a queue message to the JBoss server through servlet.Queue Message was sent successfully to HornetQ server, but MDB deployed on JBoss Server is not listening and consuming the message .Can anybody please advise what could be the issue in this setup?.

       

      Regards
      Arul

        • 1. Re: MDB Not Listening in JBoss 5.1 with HornetQ 2.2.5
          mnovak

          Hi,

           

          did you use HornetQ installer to install HornetQ? If yes then remove @ResourceAdapter("hornetq-ra.rar") from MessageConsumer.java. I'm also missing ra.xml where inbound communication for MDB is configured.

           

          Thanks,

          Mirek

          • 2. Re: MDB Not Listening in JBoss 5.1 with HornetQ 2.2.5
            jbertram

            Maybe I'm reading this wrong, but it looks to me like your HornetQ server isn't starting properly in JBoss AS.  Your log says this:

             

            2014-03-28 10:16:31,957 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

             

            DEPLOYMENTS MISSING DEPENDENCIES:
              Deployment "HornetQRAService" is missing the following dependencies:
                Dependency "HornetQServer" (should be in state "Create", but is actually in state "Described")
              Deployment "HornetQServer" is missing the following dependencies:
                Dependency "Configuration" (should be in state "Instantiated", but is actually in state "**ERROR**")
              Deployment "JMSServerManager" is missing the following dependencies:
                Dependency "HornetQServer" (should be in state "Instantiated", but is actually in state "Described")
            
            DEPLOYMENTS IN ERROR:
              Deployment "Configuration" is in error due to the following reason(s): java.net.MalformedURLException: no protocol: hornetq-configuration.xml, **ERROR**
            
            • 3. Re: MDB Not Listening in JBoss 5.1 with HornetQ 2.2.5
              arul_soft2002

              Fixed the issue by changing the Resource Adapter Class as per below.

               

              Works in JBoss 5.1 GA

              import org.jboss.ejb3.annotation.ResourceAdapter;
              @ResourceAdapter("hornetq-ra.rar")


              Works in JBoss 4.22 GA
              import org.jboss.annotation.ejb.ResourceAdapter; // Not working in JBoss 5.1

              @ResourceAdapter("jms-ra.rar")