3 Replies Latest reply on May 29, 2012 11:15 AM by clebert.suconic

    How Do I Configure HornetQ With HermesJMS?

    opticyclic

      The wiki about using HermesJMS with HornetQ (http://community.jboss.org/wiki/UsingHermesJMSWithHornetQ) just links to instructions on the Hermes JMS site.

       

      However, the images on that site are broken.

       

      I found an old copy on the wayback machine if someone wants to put the details on the wiki here instead of just linking.

      http://web.archive.org/web/20100704161231/http://www.hermesjms.com/confluence/display/HJMS/HornetQ

       

      I am running the standalone version of HornetQ.

      Is JNDI the only option to connect?

       

      I can apparently connect like this but when I try to create a queue and browse it I get the error javax.jms.JMSException: There is no queue with name Test.

      Have I connected properly?

       

      JNDI InitialContext

      loader = HornetQ

      initialContextFactory org.jnp.interfaces.NamingContextFactory

      providerURL jnp://localhost:1099

       

      Session is auto-created from the context as:

      Class hermes.JNDIConnectionFactory

      binding ConnectionFactory

      initialContextFactory org.jnp.interfaces.NamingContextFactory

      providerURL jnp://localhost:1099

        • 1. Re: How Do I Configure HornetQ With HermesJMS?
          gaohoward

          How do you create the queue? Did get more error info like stack trace along with the JMSException?

           

          Howard

          • 2. Re: How Do I Configure HornetQ With HermesJMS?
            opticyclic

            I created the queue from Hermes with:

            Actions -> New -> Add Queue

            Name = Test

            Domain = Queue

            Durable = False

             

            The full stack trace is:

             

            javax.jms.JMSException: There is no queue with name Test
            at org.hornetq.jms.client.HornetQSession.createQueue(HornetQSession.java:407)
            at hermes.impl.jms.SimpleDestinationManager.createDesintaion(SimpleDestinationManager.java:60)
            at hermes.impl.JNDIDestinationManager.createDesintaion(JNDIDestinationManager.java:105)
            at hermes.impl.jms.SimpleDestinationManager.getDestination(SimpleDestinationManager.java:137)
            at hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:387)
            at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:323)
            at hermes.browser.tasks.BrowseDestinationTask.invoke(BrowseDestinationTask.java:122)
            at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
            at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
            at java.lang.Thread.run(Thread.java:662)

             

            • 3. Re: How Do I Configure HornetQ With HermesJMS?
              clebert.suconic

              There's something wrong with the Hermes integration. This method here is used to create the Queue Object, not actually creating the queue:

               

              org.hornetq.jms.client.HornetQSession.createQueue(HornetQSession.java:407)

               

               

              However, I believe some implementations will create the actual queue after it.