| <div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Chapter 6. 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> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <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 6. 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.<jndi name>=<connection url> |
| queue.<jndi name>=<queue name> |
| topic.<jndi name>=<topic name> |
| destination.<jndi name>=<binding url> |
| </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 4. Examples">Chapter 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. 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 7. Connection URLs">Chapter 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> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <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. Destinations </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-Book.html">Home</a></td><td align="right" valign="top" width="40%"> 6.2. Queue</td></tr></table></div></div> |