Nov 18

It has been a while. I was busy. One of the things that kept me busy was putting together demonstrations for the CEC 2008 in Las Vegas, then delivering them. As an offshoot of that work I have a fair bit of material to share, which will take some time to put together into a form that can be posted in the blog. This piece is the first one.

Whereas Java CAPS 6 supports interaction with the Java MQ infrastructure through the Enterprise Manager, neither OpenESB nor GlassFishESB include the ‘Enterprise’ class functionality found in the Java CAPS ‘classic’, GUI for interaction with the JMS being one of example.

Here is a step-by-step on how to configure Hermes JMS (http://www.hermesjms.com/) for use with Java MQ, distributed as part of the OpenESB, GlassFishESB and Java CAPS 6. <- This link points to the original post.

The updated post, including material from the comments below, is available as HermesJMS_Configuration_for_JavaMQ and should be used instead.

9 Responses to “Using Hermes JMS with Java MQ in Java CAPS 6, OpenESB and GlassFishESB”

  1. jason says:

    Hi Michael, what are the advantages of HermesJMS over the built-in QBrowser utility?
    http://blogs.sun.com/pblaha/entry/jms_message_browser
    Jason

  2. Michael says:

    Hello, Jason.

    Having never worked with it I cannot comment. One thing, on superficial inspection, is that it seems to only address Java MQ, whereas Hermes JMS addresses any number of JMS implementations, including these from SeeBeyond and others.

    Regards

    Michael

  3. Rajan Jain says:

    Michael,

    I have always been a big fan of your posts. I have been trying to get HermesJMS work with remote JMQ broker with not much of luck. Your example works well with default 7676 port. But from usefullness perspective, we can use emanager to achieve the same. Presently, there is no way to monitor remote brokers ( Emanager can not monitor more than 1 broker).

    So my question is.. Do you have ideas on how to get this working for remote brokers (Not listening on port 7676).

    Appreciate your response.

    Thanks,
    Rajan

  4. Michael Czapski says:

    Hello, Rajan.

    Thanks for the good word 🙂
    Alas, this is the sticking point. I don’t know how to configure HermesJMS to use a non-default port. Perhaps Java MQ client code uses a system property to figure out what port to use, that can be configured in HermesJMS. I have not spent the time looking. If you, or anyone else, figures it out – please share 🙂

    Regards

    Michael

  5. Michael Czapski says:

    Hello, Rajan.

    You provided the motivation I lacked – thanks 🙂

    In the HermesJMS {installation directory}/bin/hermes.bat (on WIndows or equivalent on Unix) there is a command that launches Hermes JMS applicatin class. Add a java system property like:

    -DimqAddressList=mq://localhost:7677,mq://localhost:7676

    somewhere amongst other system properties there once you configured Java MQ as per original post. Hermes JMS will try each server in turn to locate the queue/topic. I have not spend the time thinking how you are going to make it resolve queues/topics with the same names on different servers 🙂

    Example from by script looks like:

    start "HermesJMS" "%JAVA_HOME%\bin\javaw" -XX:NewSize=256m -Xmx1024m -Dhermes.home="%HERMES_HOME%" %HERMES_OPTS% -Dlog4j.configuration="file:%HERMES_HOME%\bin\log4j.props" -DimqAddressList=mq://localhost:7677,mq://localhost:7676 -Dsun.java2d.noddraw=true -Dhermes="%HERMES_CONFIG%\hermes-config.xml" -Dhermes.libs="%HERMES_LIBS%" hermes.browser.HermesBrowser

    Regards

    Michael

  6. Isa Hashim says:

    Hi Michael,

    A number of people have been asking about HermesJMS/Open MQ on the MQ forum:

    http://forums.sun.com/forum.jspa?forumID=711

    and on users@mq.dev.java.net for a while now – thanX very much for your useful post.

    I’ve just written up and placed a FAQ at:

    http://wiki.glassfish.java.net/Wiki.jsp?page=OpenMQHermesJMSQuestions

    which contains similar steps to yours plus some steps for configuring HermesJMS via JNDI. I’m currently also looking at creating an OpenMQ plugin for HermesJMS so that HermesJMS among other things can ‘discover’ the destinations on the MQ broker instead of the user having to know the destinations to browse; the above FAQ page will be updated when that work materializes.

    With regards to connecting to a remote broker, I was only succesful by doing it via the JNDI way. I tried to add properties to the connection factory (eg {imqAddressList=mq://localhost:7677}) after selecting it on the Preferences dialog:

    http://wiki.glassfish.java.net/attach/OpenMQHermesJMSQuestions/new_session_choose_cf.gif

    but it didn’t work. I’ll keep looking… Let me know if you manage to get it to work other than using ‘-DimqAddressList=…’ on the command line – I would like to get this to work so that I can connect to multiple remote brokers at the same time and browse/copy msgs to/from them.

    regards,
    -isa

  7. Pavneet says:

    Is there a web console available to manage queues/topic?

  8. Michael Czapski says:

    Not in Hermes JMS that I am aware of.
    If you have Java CAPS 6 there is the Enterprise Manager that provides this functionality, amongst other things.

    Regards

    Michael

  9. Srinivas says:

    Hi Michael,
    This post is quite helpful. I have tried setting up Hermes JMS for SeeBeyond JCAPS plugin. Everything worked as per the document at Hermes website. I am getting the JMSException: java.net.ConnectException: Connection refused: connect

    The client is detecting the queues in the message server but fails to connect to queues.

    Any suggestions or hint what is going wrong.

    Regards
    Srinivas Erukulla

Leave a Reply to Srinivas

preload preload preload