<p>This example shows you how to use a JMS <ahref="http://java.sun.com/javaee/5/docs/api/javax/jms/QueueBrowser.html">QueueBrowser</a> with ActiveMQ.<br/>
Queues are a standard part of JMS, please consult the JMS 1.1 specification for full details.<br/>
A QueueBrowser is used to look at messages on the queue without removing them.
It can scan the entire content of a queue or only messages matching a message selector.</p>
<p>
The example will send 2 messages on a queue, use a QueueBrowser to browse
the queue (looking at the message without removing them) and finally consume the 2 messages
</p>
<h2>Example step-by-step</h2>
<p><i>To run the example, simply type <code>mvn verify</code> from this directory</i></p>
<ol>
<li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
<li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>