blob: 4e78b3a54e6b41aaf609564e7d8a2e61d3cbd54d [file] [log] [blame]
<div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Chapter&#160;6.&#160;JNDI Properties Format</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Client-Understanding-Destinations.html">Prev</a>&#160;</td><th align="center" width="60%">&#160;</th><td align="right" width="20%">&#160;<a accesskey="n" href="JMS-Client-0-8-JNDI-Properties-Format-Queue.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="JMS-Client-0-8-JNDI-Properties-Format"></a>Chapter&#160;6.&#160;JNDI Properties Format</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="JMS-Client-0-8-JNDI-Properties-Format.html#JMS-Client-0-8-JNDI-Properties-Format-ConnectionFactory">6.1. ConnectionFactory</a></span></dt><dt><span class="section"><a href="JMS-Client-0-8-JNDI-Properties-Format-Queue.html">6.2. Queue</a></span></dt><dt><span class="section"><a href="JMS-Client-0-8-JNDI-Properties-Format-Topic.html">6.3. Topic</a></span></dt><dt><span class="section"><a href="JMS-Client-0-8-JNDI-Properties-Format-Destination.html">6.4. Destination</a></span></dt></dl></div><p>The Client comes with own JNDI context factory
<code class="literal">org.apache.qpid.jndi.PropertiesFileInitialContextFactory</code> which utilises a
Java properties file for declaring the JMS administered objects: connection factories, queues,
topics and destinations. It uses the following syntax:</p><p>
</p><pre class="screen">
connectionfactory.&lt;jndi name&gt;=&lt;connection url&gt;
queue.&lt;jndi name&gt;=&lt;queue name&gt;
topic.&lt;jndi name&gt;=&lt;topic name&gt;
destination.&lt;jndi name&gt;=&lt;binding url&gt;
</pre><p>An arbitrary number of connection factories, queues, topics, queues or destinations or can
be declared in the JNDI properties file. Each JNDI name must be unique.</p><p>The application looks up the objects via an InitialContext. This lookup and an example JNDI
properties file is provided in <a class="xref" href="JMS-Client-0-8-Examples.html" title="Chapter&#160;4.&#160;Examples">Chapter&#160;4, <em>Examples</em></a></p><p>We now consider each JMS administered object type in turn.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="JMS-Client-0-8-JNDI-Properties-Format-ConnectionFactory"></a>6.1.&#160;ConnectionFactory</h2></div></div></div><p><code class="literal">connectionfactory.</code><span class="emphasis"><em>name</em></span> declares a <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/ConnectionFactory.html" target="_top">ConnectionFactory</a> with the
given JNDI name. The value must be a legal Connection URL.</p><p>See <a class="xref" href="JMS-Client-0-8-Connection-URL.html" title="Chapter&#160;7.&#160;Connection URLs">Chapter&#160;7, <em>Connection URLs</em></a> for format of the URL and its
permitted options.</p></div></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="JMS-Client-0-8-Client-Understanding-Destinations.html">Prev</a>&#160;</td><td align="center" width="20%">&#160;</td><td align="right" width="40%">&#160;<a accesskey="n" href="JMS-Client-0-8-JNDI-Properties-Format-Queue.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">5.7.&#160;Destinations&#160;</td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-Book.html">Home</a></td><td align="right" valign="top" width="40%">&#160;6.2.&#160;Queue</td></tr></table></div></div>