summaryrefslogtreecommitdiff
path: root/content/xdocs/HermesJMS.html
blob: 69228f4ad0bfb7b91043de31480ec7c8dbd5be56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<html>
    <head>
        <title>Apache Qpid : HermesJMS</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            Apache Qpid : HermesJMS
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Oct 19, 2006 by <font color="#0050B2">mmccorma</font>.
				    </div>

				    <p><font color="red"><br/>
This is a draft </font></p>

<h1><a name="HermesJMS-Background"></a>Background </h1>

<p><a href="http://hermesjms.com" title="Visit page outside Confluence">HermesJMS</a> is a console for JMS messaging and supports QPID. This page shows how to configure Hermes with QPID.</p>

<p>As the QPID codebase is moving quickly forward at the moment and there are some workarounds in place within Hermes to support it, you should ensure that you download the latest Hermes build from <a href="http://hermesjms.com/patches" title="Visit page outside Confluence">HEAD</a></p>

<p>Finally, you should familiarise youself with Hermes via the tutorials on the website before continuing. Look at the Tibco EMS and JBoss tutorials for how to use connection factories directly or via JNDI. This page uses them directly.</p>

<h1><a name="HermesJMS-Configuring"></a>Configuring </h1>

<p>To get QPID working, you need to configure the libraries to load via the GUI. Hermes loads up each provider in its own classloader to avoid any dependency problems across providers. This tutorial assumes you've downloaded and built QPID via the <tt>ant dist</tt> task.</p>

<h2><a name="HermesJMS-ConfiguretheCLASSPATH"></a>Configure the CLASSPATH </h2>

<p>Start Hermes and select <em>Options -&gt; Configuration</em> and click on the <em>Providers</em> tab. Create a new classpath group (right click for this) and add the following JARS to it:</p>

<p><span class="error">Cannot resolve external resource into attachment.</span></p>


<p>When asked, choose the scan option to get Hermes to search the libraries to find any classes that implement JMS connection factory interfaces, this is essential for the next step.</p>

<p>Finally, click OK.</p>

<h2><a name="HermesJMS-ConfigureTheSession"></a>Configure The Session </h2>

<p>Right click on the tree of sessions and select <em>New -&gt; Session</em>. In the session combo box at the top put in the name you want, for example QPID. Its important the next thing you do is select the loader so the dialog can find any connection factories.</p>

<p>In the <em>Class</em> combo box choose the <tt>org.apache.qpid.client.AMQConnectionFactory</tt>.</p>

<p>Next, in the property list for the connection factory, right click to add new properties and use the combo to select which one and add their value.</p>

<p>Finally, and very importantly, check the <em>Use consumer</em> checkbox at the top. QPID does not support JMS queue browsing but Hermes lets you use a {<tt>MessageConsumer</tt> instead. Remember of course that if an consumer is currently active you will not get the real queue content, Hermes uses a transacted session and some messages may be uncommitted in another consumers session.</p>

<h2><a name="HermesJMS-AddDestinations"></a>Add Destinations </h2>

<p>Currently you must manually add queues and topics. You can add them now or later from the <em>New queue</em>, <em>New topic</em> or <em>New durable subscription</em> actions in the toolbar. If you add them now then right click in the destination list to add them.</p>

<p>The session and destinations should look something like this. Once happy, click OK.</p>

<p><span class="error">Cannot resolve external resource into attachment.</span></p>

<h2><a name="HermesJMS-TryaBrowse"></a>Try a Browse </h2>

<p>Finally, double click on a queue or topic in the newly created session in the tree and you should get see something like the following (assuming you've got something in the queue or being published in the topic to see):</p>

<p><span class="error">Cannot resolve external resource into attachment.</span></p>

<p>This message is a JMS <tt>BytesMessage</tt> so there not much to see until you see its really a <a href="http://fixprotocol.org" title="Visit page outside Confluence">FIX </a> message and clicking on the FIX tab reveals it.</p>

<p><span class="error">Cannot resolve external resource into attachment.</span></p>

<h1><a name="HermesJMS-OtherFeatures"></a>Other Features</h1>

<p>Refer to the <a href="http://hermesjms.com" title="Visit page outside Confluence">HermesJMS</a> site for how to use all the other feature of HermesJMS with QPID.</p>

<h1><a name="HermesJMS-Issues"></a>Issues </h1>

<p>1. Queues must already exist before you browse them.</p>

<p>1. <tt>get/setJMSDestination()</tt> is not supported on a message so <tt>Unknown</tt> is shown.</p>

				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="border/border_bottom.gif"><img src="border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Apr 22, 2008 02:47</font></td>
		    </tr>
	    </table>
    </body>
</html>