Hermes JMS – Revisited for WebLogic Server JMS 10gR3
By james.bayer on Feb 18, 2009
Hermes JMS is an open source JMS Browser created by Colin Crist and hosted on Sourgeforge that works with numerous JMS implementations including WebLogic JMS and Oracle Application Server JMS. I have written about using Hermes and WebLogic together before so see that entry for an overview. I have found that this tool works great for me to quickly view/move/delete JMS messages in queues and topics. This entry is simply an update for the recent version of Hermes 1.13 and WebLogic Server 10gR3. Here’s a screenshot that highlights just some of the capabilities, click to enlarge.
- I like using the off-line installation from Sourceforge for reasons that will probably become apparent below, but there is also a Web Start version on the project home page.
- I found an old comment that I had written that claimed using the same JVM as the WLS server with Hermes helps, so I modify the %HERMES_INSTALL%\bin\hermes.bat file to use JRockit from WLS 10gR3:
- Launch Hermes and go to Options->Preferences to add the weblogic.jar to the providers tab, this is nice because presumably I could use multiple WLS versions (I haven’t tried that)
- Configure a new Session in the GUI.
- Then right click on the session and select “Discover” and you should have all the destinations available to browse.
- The Session gets saved in hermes-config.xml (C:\.hermes\hermes-config.xml on my machine) and the relevant snippet looks like this:
<property name="initialContextFactory" value="weblogic.jndi.WLInitialContextFactory"/>
<property name="providerURL" value="t3://localhost:7001"/>
<property name="securityCredentials" value="weblogic"/>
<property name="binding" value="javax/jms/QueueConnectionFactory"/>
<property name="securityPrincipal" value="weblogic"/>
<connection clientID="" connectionPerThread="false">
<session audit="false" id="examplesQCF" reconnects="0" transacted="true" useConsumerForQueueBrowse="false"/>
<destination domain="1" name="weblogic/wsee/DefaultQueue"/>
<destination domain="1" name="weblogic/examples/ejb30/ExampleQueue"/>
<destination domain="2" name="weblogic/examples/jms/exampleTopic"/>
<destination domain="1" name="weblogic/examples/jms/exampleQueue"/>
<destination domain="1" name="jms/MULTIDATASOURCE_MDB_QUEUE"/>
<destination domain="2" name="quotes"/>
<destination domain="2" name="stockTopic"/>
Now you should be ready to browse. You could also take the alternative route of binding to the Initial Context of the server, which then makes it easy to create multiple Sessions from the Connection Factory objects. However, I had trouble doing this without editing the hermes-config.xml due to what might be a fluke in the GUI for changing the class-loader provider from System to the WebLogic10.3 one that has the weblogic.jar. If you have trouble with this you can either edit the hermes-config.xml file to have the correct provider or just add the weblogic.jar to the classpath (so System inherits it). Good luck with Hermes.