You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jo...@apache.org on 2010/06/17 00:01:46 UTC

svn commit: r955411 [4/10] - in /qpid/site/docs/books: 0.5/AMQP-Messaging-Broker-CPP-Book/html/ 0.5/Programming-In-Apache-Qpid/html/ 0.5/Programming-In-Apache-Qpid/pdf/ 0.6/AMQP-Messaging-Broker-CPP-Book/html/ 0.6/Programming-In-Apache-Qpid/html/ 0.6/P...

Modified: qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s09.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s09.html?rev=955411&r1=955410&r2=955411&view=diff
==============================================================================
--- qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s09.html (original)
+++ qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s09.html Wed Jun 16 22:01:44 2010
@@ -1,76 +1,18 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>9. Reliability</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s08.html" title="8. Performance"><link rel="next" href="ch02s10.html" title="10. Security"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">9. Reliability</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s08.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s10.html">Next</a></td></tr></table><hr></div><div class="section" title="9. Reliability"><div c
 lass="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2622721"></a>9. Reliability</h2></div></div></div><p>The Qpid Messaging API supports automatic reconnect, guaranteed delivery via persistent messages, reliability options in senders and receivers, and cluster failover. This section shows how programs can take advantage of these features.</p><div class="section" title="9.1. Reconnect"><div class="titlepage"><div><div><h3 class="title"><a name="id2622733"></a>9.1. Reconnect</h3></div></div></div><p>Connections in the Qpid Messaging API support automatic
-	reconnect if a connection is lost. This is done using connection
-	options. The following example shows how to use connection options in C++ and Python.</p><div class="example"><a name="id2622745"></a><p class="title"><b>Example 2.17. Specifying Connection Options in C++ and Python</b></p><div class="example-contents"><p>In C++, these options are set using <code class="function">Connection::setOption()</code>:</p><pre class="programlisting">
-Connection connection(broker);
-connection.setOption("reconnect", true);
-try {
-    connection.open();
-    !!! SNIP !!!
-    </pre><p>In Python, these options are set using named arguments in
-	  the <code class="function">Connection</code> constructor:</p><pre class="programlisting">
-connection = Connection("localhost:5672", reconnect=True)
-try:
-  connection.open()
-  !!! SNIP !!!
-  </pre><p>See the reference documentation for details on how to set
-	  these on connections for each language.</p></div></div><br class="example-break"><p>The following table lists the connection options that can
-	be used.</p><div class="table"><a name="id2622795"></a><p class="title"><b>Table 2.6. Connection Options</b></p><div class="table-contents"><table summary="Connection Options" width="100%" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>option</th><th>value</th><th>semantics</th></tr></thead><tbody><tr><td>
-		  reconnect
-		</td><td>
-		  True, False
-		</td><td>
-		  Transparently reconnect if the connection is lost.
-		</td></tr><tr><td>
-		  reconnect_timeout
-		</td><td>
-		  N
-		</td><td>
-		  Total number of seconds to continue reconnection attempts before giving up and raising an exception.
-		</td></tr><tr><td>
-		  reconnect_limit
-		</td><td>
-		  N
-		</td><td>
-		  Maximum number of reconnection attempts before giving up and raising an exception.
-		</td></tr><tr><td>
-		  reconnect_interval_min
-		</td><td>
-		  N
-		</td><td>
-		  Minimum number of seconds between reconnection attempts. The first reconnection attempt is made immediately; if that fails, the first reconnection delay is set to the value of <code class="literal">reconnect_interval_min</code>; if that attempt fails, the reconnect interval increases exponentially until a reconnection attempt succeeds or <code class="literal">reconnect_interval_max</code> is reached.
-		</td></tr><tr><td>
-		  reconnect_interval_max
-		</td><td>
-		  N
-		</td><td>
-		  Maximum reconnect interval.
-		</td></tr><tr><td>
-		  reconnect_interval
-		</td><td>
-		  N
-		</td><td>
-		  Sets both <code class="literal">reconnection_interval_min</code> and <code class="literal">reconnection_interval_max</code> to the same value.
-		</td></tr></tbody></table></div></div><br class="table-break"></div><div class="section" title="9.2. Guaranteed Delivery"><div class="titlepage"><div><div><h3 class="title"><a name="id2622956"></a>9.2. Guaranteed Delivery</h3></div></div></div><p>If a queue is durable, the queue survives a messaging
-	broker crash, as well as any durable messages that have been
-	placed on the queue. These messages will be delivered when the
-	messaging broker is restarted. Delivery is guaranteed if and
-	only if both the message and the queue are durable. Guaranteed
-	delivery requires a persistence module, such as the one
-	available from <a class="ulink" href="http://QpidComponents.org" target="_top">QpidComponents.org</a>.</p><div class="example"><a name="id2622983"></a><p class="title"><b>Example 2.18. Guaranteed Delivery</b></p><div class="example-contents"><p>C++:</p><pre class="programlisting">
-Sender sender = session.createSender("durable-queue");
-
-Message message("Hello world!");
-message.setDurable(1);
-
-sender.send(Message("Hello world!"));
-</pre></div></div><br class="example-break"></div><div class="section" title="9.3. Reliability Options in Senders and Receivers"><div class="titlepage"><div><div><h3 class="title"><a name="id2623004"></a>9.3. Reliability Options in Senders and Receivers</h3></div></div></div><p>When creating a sender or a receiver, you can specify a reliability option in the address string. For instance, the following specifies <code class="literal">at-least-once</code> as the reliability mode for a sender:</p><pre class="programlisting">
-Sender = session.createSender("topic;{create:always,link:{reliability:at-least-once}}");
-	</pre><p>The modes <code class="literal">unreliable</code>, <code class="literal">at-most-once</code>, <code class="literal">at-least-once</code>, and <code class="literal">exactly-once</code> are supported. These modes govern the reliability of the connection between the client and the messaging broker.</p><p>The modes <code class="literal">unreliable</code> and <code class="literal">at-most-once</code> are currently synonyms. In a receiver, this mode means that messages received on an auto-delete subscription queue may be lost in the event of a broker failure. In a sender, this mode means that the sender can consider a message sent as soon as it is written to the wire, and need not wait for broker acknowledgement before considering the message sent.</p><p>The mode <code class="literal">at-most-once</code> ensures that messages are not lost, but duplicates of a message may occur. In a receiver, this mode ensures that messages are not lost in event of a broker failure. In a
  sender, this means that messages are kept in a replay buffer after they have been sent, and removed from this buffer only after the broker acknowledges receipt; if a broker failure occurs, messages in the replay buffer are resent upon reconnection. The mode <code class="literal">exactly-once</code> is similar to <code class="literal">at-most-once</code>, but eliminates duplicate messages.</p></div><div class="section" title="9.4. Cluster Failover"><div class="titlepage"><div><div><h3 class="title"><a name="id2623104"></a>9.4. Cluster Failover</h3></div></div></div><p>The messaging broker can be run in clustering mode, which provides high reliability at-least-once messaging. If one broker in a cluster fails, clients can choose another broker in the cluster and continue their work.</p><p>In C++, the <code class="classname">FailoverUpdates</code> class keeps track of the brokers in a cluster, so a reconnect can select another broker in the cluster to connect to:</p><div clas
 s="example"><a name="id2623125"></a><p class="title"><b>Example 2.19. Cluster Failover in C++</b></p><div class="example-contents"><pre class="programlisting">
-#include &lt;qpid/messaging/FailoverUpdates.h&gt;
-...
-Connection connection(broker);
-connection.setOption("reconnect", true);
-try {
-    connection.open();
-    std::auto_ptr&lt;FailoverUpdates&gt; updates(new FailoverUpdates(connection));
-	</pre></div></div><br class="example-break"></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s08.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s10.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">8. Performance </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 10. Security</td></tr></table></div></body></html>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>9. Performance</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s08.html" title="8. Maps in Message Content"><link rel="next" href="ch02s10.html" title="10. Reliability"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">9. Performance</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s08.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s10.html">Next</a></td></tr></table><hr></div><div class="section" title="9. Perf
 ormance"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2727808"></a>9. Performance</h2></div></div></div><p>
+         Clients can often be made significantly faster by batching acknowledgements and setting the capacity of receivers to allow prefetch. The size of a sender's replay buffer can also affect performance.
+      </p><div class="section" title="9.1. Batching Acknowledgements"><div class="titlepage"><div><div><h3 class="title"><a name="id2727820"></a>9.1. Batching Acknowledgements</h3></div></div></div><p>Many of the simple examples we have shown retrieve a message and immediately acknowledge it. Because each acknowledgement results in network traffic, you can dramatically increase performance by acknowledging messages in batches. For instance, an application can read a number of related messages, then acknowledge the entire batch, or an application can acknowledge after a certain number of messages have been received or a certain time period has elapsed. Messages are not removed from the broker until they are acknowledged, so guaranteed delivery is still available when batching acknowledgements.</p></div><div class="section" title="9.2. Prefetch"><div class="titlepage"><div><div><h3 class="title"><a name="id2727840"></a>9.2. Prefetch</h3></div></div></div><p>By default, a r
 eceiver retrieves the next message from the server, one message at a time, which provides intuitive results when writing and debugging programs, but does not provide optimum performance. To create an input buffer, set the capacity of the receiver to the size of the desired input buffer; for many applications, a capacity of 100 performs well. </p><div class="example"><a name="id2787506"></a><p class="title"><b>Example 2.16. Prefetch</b></p><div class="example-contents"><p>C++</p><pre class="programlisting">
+Receiver receiver = session.createReceiver(address);
+receiver.setCapacity(100);
+Message message = receiver.fetch();
+	  </pre></div></div><br class="example-break"></div><div class="section" title="9.3. Sizing the Replay Buffer"><div class="titlepage"><div><div><h3 class="title"><a name="id2787527"></a>9.3. Sizing the Replay Buffer</h3></div></div></div><p>In order to guarantee delivery, a sender automatically
+	keeps messages in a replay buffer until the messaging broker
+	acknowledges that they have been received. The replay buffer
+	is held in memory, and is never paged to disk. For most
+	applications, the default size of the replay buffer works
+	well. A large replay buffer requires more memory, a small
+	buffer can slow down the client because it can not send new
+	messages if the replay buffer is full, and must wait for
+	existing sends to be acknowledged.</p><div class="example"><a name="id2787544"></a><p class="title"><b>Example 2.17. Sizing the Replay Buffer</b></p><div class="example-contents"><p>C++</p><pre class="programlisting">
+Sender sender = session.createSender(address);
+sender.setCapacity(100);
+	  </pre></div></div><br class="example-break"></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s08.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s10.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">8. Maps in Message Content </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 10. Reliability</td></tr></table></div></body></html>

Modified: qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s10.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s10.html?rev=955411&r1=955410&r2=955411&view=diff
==============================================================================
--- qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s10.html (original)
+++ qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s10.html Wed Jun 16 22:01:44 2010
@@ -1,39 +1,76 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>10. Security</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s09.html" title="9. Reliability"><link rel="next" href="ch02s11.html" title="11. Transactions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">10. Security</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s09.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s11.html">Next</a></td></tr></table><hr></div><div class="section" title="10. Security"><div cla
 ss="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2623137"></a>10. Security</h2></div></div></div><p>Qpid provides authentication, rule-based authorization, encryption, and digital signing.</p><p>Authentication is done using Simple Authentication and
-      Security Layer (SASL) to authenticate client connections to the
-      broker. SASL is a framework that supports a variety of
-      authentication methods. For secure applications, we suggest
-      CRAM-MD5, DIGEST-MD5, or GSSAPI (Kerberos). The ANONYMOUS method
-      is not secure. The PLAIN method is secure only when used
-      together with SSL.</p><p>To enable Kerberos in a client, set the <code class="varname">sals-mechanism</code> connection option to <code class="literal">GSSAPI</code>:</p><pre class="programlisting">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>10. Reliability</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s09.html" title="9. Performance"><link rel="next" href="ch02s11.html" title="11. Security"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">10. Reliability</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s09.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s11.html">Next</a></td></tr></table><hr></div><div class="section" title="10. Reliability"><di
 v class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2787563"></a>10. Reliability</h2></div></div></div><p>The Qpid Messaging API supports automatic reconnect, guaranteed delivery via persistent messages, reliability options in senders and receivers, and cluster failover. This section shows how programs can take advantage of these features.</p><div class="section" title="10.1. Reconnect"><div class="titlepage"><div><div><h3 class="title"><a name="id2787575"></a>10.1. Reconnect</h3></div></div></div><p>Connections in the Qpid Messaging API support automatic
+	reconnect if a connection is lost. This is done using connection
+	options. The following example shows how to use connection options in C++ and Python.</p><div class="example"><a name="id2787587"></a><p class="title"><b>Example 2.18. Specifying Connection Options in C++ and Python</b></p><div class="example-contents"><p>In C++, these options are set using <code class="function">Connection::setOption()</code>:</p><pre class="programlisting">
 Connection connection(broker);
-connection.setOption("sasl-mechanism", "GSSAPI");
+connection.setOption("reconnect", true);
 try {
     connection.open();
-    ...
-      </pre><p>For Kerberos authentication, if the user running the
-      program is already authenticated, e.g. using
-      <span class="command"><strong>kinit</strong></span>, there is no need to supply a user name
-      or password. If you are using another form of authentication, or are not already authenticated with Kerberos, you can supply these as connection options:</p><pre class="programlisting">
-connection.setOption("username", "mick");
-connection.setOption("password", "pa$$word");
-      </pre><p>Encryption and signing are done using SSL (they can also be done using SASL, but SSL provides stronger encryption). To enable SSL, set the <code class="varname">protocol</code> connection option to <code class="literal">ssl</code>:</p><pre class="programlisting">
-connection.setOption("protocol", "ssl");
-      </pre><p>Use the following environment variables to configure the SSL client:</p><div class="table"><a name="id2623232"></a><p class="title"><b>Table 2.7. SSL Client Environment Variables for C++ clients</b></p><div class="table-contents"><table summary="SSL Client Environment Variables for C++ clients" border="1"><colgroup><col align="left"><col align="left"></colgroup><thead><tr><th colspan="2" align="center">
-		SSL Client Options for C++ clients
-	      </th></tr></thead><tbody><tr><td align="left">
-		<span class="command"><strong>SSL_USE_EXPORT_POLICY</strong></span>
-	      </td><td align="left">
-		Use NSS export policy
-	      </td></tr><tr><td align="left">
-		<span class="command"><strong>SSL_CERT_PASSWORD_FILE <em class="replaceable"><code>PATH</code></em></strong></span>
-	      </td><td align="left">
-		File containing password to use for accessing certificate database
-	      </td></tr><tr><td align="left">
-		<span class="command"><strong>SSL_CERT_DB <em class="replaceable"><code>PATH</code></em></strong></span>
-	      </td><td align="left">
-		Path to directory containing certificate database
-	      </td></tr><tr><td align="left">
-		<span class="command"><strong>SSL_CERT_NAME <em class="replaceable"><code>NAME</code></em></strong></span>
-	      </td><td align="left">
-		Name of the certificate to use. When SSL client authentication is enabled, a certificate name should normally be provided.
-	      </td></tr></tbody></table></div></div><br class="table-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s09.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s11.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">9. Reliability </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 11. Transactions</td></tr></table></div></body></html>
+    !!! SNIP !!!
+    </pre><p>In Python, these options are set using named arguments in
+	  the <code class="function">Connection</code> constructor:</p><pre class="programlisting">
+connection = Connection("localhost:5672", reconnect=True)
+try:
+  connection.open()
+  !!! SNIP !!!
+  </pre><p>See the reference documentation for details on how to set
+	  these on connections for each language.</p></div></div><br class="example-break"><p>The following table lists the connection options that can
+	be used.</p><div class="table"><a name="id2787637"></a><p class="title"><b>Table 2.6. Connection Options</b></p><div class="table-contents"><table summary="Connection Options" width="100%" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>option</th><th>value</th><th>semantics</th></tr></thead><tbody><tr><td>
+		  reconnect
+		</td><td>
+		  True, False
+		</td><td>
+		  Transparently reconnect if the connection is lost.
+		</td></tr><tr><td>
+		  reconnect_timeout
+		</td><td>
+		  N
+		</td><td>
+		  Total number of seconds to continue reconnection attempts before giving up and raising an exception.
+		</td></tr><tr><td>
+		  reconnect_limit
+		</td><td>
+		  N
+		</td><td>
+		  Maximum number of reconnection attempts before giving up and raising an exception.
+		</td></tr><tr><td>
+		  reconnect_interval_min
+		</td><td>
+		  N
+		</td><td>
+		  Minimum number of seconds between reconnection attempts. The first reconnection attempt is made immediately; if that fails, the first reconnection delay is set to the value of <code class="literal">reconnect_interval_min</code>; if that attempt fails, the reconnect interval increases exponentially until a reconnection attempt succeeds or <code class="literal">reconnect_interval_max</code> is reached.
+		</td></tr><tr><td>
+		  reconnect_interval_max
+		</td><td>
+		  N
+		</td><td>
+		  Maximum reconnect interval.
+		</td></tr><tr><td>
+		  reconnect_interval
+		</td><td>
+		  N
+		</td><td>
+		  Sets both <code class="literal">reconnection_interval_min</code> and <code class="literal">reconnection_interval_max</code> to the same value.
+		</td></tr></tbody></table></div></div><br class="table-break"></div><div class="section" title="10.2. Guaranteed Delivery"><div class="titlepage"><div><div><h3 class="title"><a name="id2787798"></a>10.2. Guaranteed Delivery</h3></div></div></div><p>If a queue is durable, the queue survives a messaging
+	broker crash, as well as any durable messages that have been
+	placed on the queue. These messages will be delivered when the
+	messaging broker is restarted. Delivery is guaranteed if and
+	only if both the message and the queue are durable. Guaranteed
+	delivery requires a persistence module, such as the one
+	available from <a class="ulink" href="http://QpidComponents.org" target="_top">QpidComponents.org</a>.</p><div class="example"><a name="id2787818"></a><p class="title"><b>Example 2.19. Guaranteed Delivery</b></p><div class="example-contents"><p>C++:</p><pre class="programlisting">
+Sender sender = session.createSender("durable-queue");
+
+Message message("Hello world!");
+message.setDurable(1);
+
+sender.send(Message("Hello world!"));
+</pre></div></div><br class="example-break"></div><div class="section" title="10.3. Reliability Options in Senders and Receivers"><div class="titlepage"><div><div><h3 class="title"><a name="id2787839"></a>10.3. Reliability Options in Senders and Receivers</h3></div></div></div><p>When creating a sender or a receiver, you can specify a reliability option in the address string. For instance, the following specifies <code class="literal">at-least-once</code> as the reliability mode for a sender:</p><pre class="programlisting">
+Sender = session.createSender("topic;{create:always,link:{reliability:at-least-once}}");
+	</pre><p>The modes <code class="literal">unreliable</code>, <code class="literal">at-most-once</code>, <code class="literal">at-least-once</code>, and <code class="literal">exactly-once</code> are supported. These modes govern the reliability of the connection between the client and the messaging broker.</p><p>The modes <code class="literal">unreliable</code> and <code class="literal">at-most-once</code> are currently synonyms. In a receiver, this mode means that messages received on an auto-delete subscription queue may be lost in the event of a broker failure. In a sender, this mode means that the sender can consider a message sent as soon as it is written to the wire, and need not wait for broker acknowledgement before considering the message sent.</p><p>The mode <code class="literal">at-most-once</code> ensures that messages are not lost, but duplicates of a message may occur. In a receiver, this mode ensures that messages are not lost in event of a broker failure. In a
  sender, this means that messages are kept in a replay buffer after they have been sent, and removed from this buffer only after the broker acknowledges receipt; if a broker failure occurs, messages in the replay buffer are resent upon reconnection. The mode <code class="literal">exactly-once</code> is similar to <code class="literal">at-most-once</code>, but eliminates duplicate messages.</p></div><div class="section" title="10.4. Cluster Failover"><div class="titlepage"><div><div><h3 class="title"><a name="id2787939"></a>10.4. Cluster Failover</h3></div></div></div><p>The messaging broker can be run in clustering mode, which provides high reliability at-least-once messaging. If one broker in a cluster fails, clients can choose another broker in the cluster and continue their work.</p><p>In C++, the <code class="classname">FailoverUpdates</code> class keeps track of the brokers in a cluster, so a reconnect can select another broker in the cluster to connect to:</p><div cl
 ass="example"><a name="id2787960"></a><p class="title"><b>Example 2.20. Cluster Failover in C++</b></p><div class="example-contents"><pre class="programlisting">
+#include &lt;qpid/messaging/FailoverUpdates.h&gt;
+...
+Connection connection(broker);
+connection.setOption("reconnect", true);
+try {
+    connection.open();
+    std::auto_ptr&lt;FailoverUpdates&gt; updates(new FailoverUpdates(connection));
+	</pre></div></div><br class="example-break"></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s09.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s11.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">9. Performance </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 11. Security</td></tr></table></div></body></html>

Modified: qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s11.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s11.html?rev=955411&r1=955410&r2=955411&view=diff
==============================================================================
--- qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s11.html (original)
+++ qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s11.html Wed Jun 16 22:01:44 2010
@@ -1,17 +1,39 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>11. Transactions</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s10.html" title="10. Security"><link rel="next" href="ch02s12.html" title="12. The AMQP 0-10 mapping"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">11. Transactions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s10.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s12.html">Next</a></td></tr></table><hr></div><div class="section" title="11. Tra
 nsactions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2623351"></a>11. Transactions</h2></div></div></div><p>In AMQP, transactions cover the semantics of enqueues and
-      dequeues.</p><p>When sending messages, a transaction tracks enqueues
-      without actually delivering the messages, a commit places
-      messages on their queues, and a rollback discards the
-      enqueues.</p><p>When receiving messages, a transaction tracks dequeues
-      without actually removing acknowledged messages, a commit
-      removes all acknowledged messages, and a rollback discards
-      acknowledgements. A rollback does not release the message, it
-      must be explicitly released to return it to the queue.</p><div class="example"><a name="id2623376"></a><p class="title"><b>Example 2.20. Transactions</b></p><div class="example-contents"><p>C++:</p><pre class="programlisting">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>11. Security</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s10.html" title="10. Reliability"><link rel="next" href="ch02s12.html" title="12. Transactions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">11. Security</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s10.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s12.html">Next</a></td></tr></table><hr></div><div class="section" title="11. Security"><div cl
 ass="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2787972"></a>11. Security</h2></div></div></div><p>Qpid provides authentication, rule-based authorization, encryption, and digital signing.</p><p>Authentication is done using Simple Authentication and
+      Security Layer (SASL) to authenticate client connections to the
+      broker. SASL is a framework that supports a variety of
+      authentication methods. For secure applications, we suggest
+      CRAM-MD5, DIGEST-MD5, or GSSAPI (Kerberos). The ANONYMOUS method
+      is not secure. The PLAIN method is secure only when used
+      together with SSL.</p><p>To enable Kerberos in a client, set the <code class="varname">sals-mechanism</code> connection option to <code class="literal">GSSAPI</code>:</p><pre class="programlisting">
 Connection connection(broker);
-Session session =  connection.createTransactionalSession();
-...
-if (smellsOk())
-   session.commit();
-else 
-   session.rollback();
-   </pre></div></div><br class="example-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s10.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s12.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">10. Security </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 12. The AMQP 0-10 mapping</td></tr></table></div></body></html>
+connection.setOption("sasl-mechanism", "GSSAPI");
+try {
+    connection.open();
+    ...
+      </pre><p>For Kerberos authentication, if the user running the
+      program is already authenticated, e.g. using
+      <span class="command"><strong>kinit</strong></span>, there is no need to supply a user name
+      or password. If you are using another form of authentication, or are not already authenticated with Kerberos, you can supply these as connection options:</p><pre class="programlisting">
+connection.setOption("username", "mick");
+connection.setOption("password", "pa$$word");
+      </pre><p>Encryption and signing are done using SSL (they can also be done using SASL, but SSL provides stronger encryption). To enable SSL, set the <code class="varname">protocol</code> connection option to <code class="literal">ssl</code>:</p><pre class="programlisting">
+connection.setOption("protocol", "ssl");
+      </pre><p>Use the following environment variables to configure the SSL client:</p><div class="table"><a name="id2788074"></a><p class="title"><b>Table 2.7. SSL Client Environment Variables for C++ clients</b></p><div class="table-contents"><table summary="SSL Client Environment Variables for C++ clients" border="1"><colgroup><col align="left"><col align="left"></colgroup><thead><tr><th colspan="2" align="center">
+		SSL Client Options for C++ clients
+	      </th></tr></thead><tbody><tr><td align="left">
+		<span class="command"><strong>SSL_USE_EXPORT_POLICY</strong></span>
+	      </td><td align="left">
+		Use NSS export policy
+	      </td></tr><tr><td align="left">
+		<span class="command"><strong>SSL_CERT_PASSWORD_FILE <em class="replaceable"><code>PATH</code></em></strong></span>
+	      </td><td align="left">
+		File containing password to use for accessing certificate database
+	      </td></tr><tr><td align="left">
+		<span class="command"><strong>SSL_CERT_DB <em class="replaceable"><code>PATH</code></em></strong></span>
+	      </td><td align="left">
+		Path to directory containing certificate database
+	      </td></tr><tr><td align="left">
+		<span class="command"><strong>SSL_CERT_NAME <em class="replaceable"><code>NAME</code></em></strong></span>
+	      </td><td align="left">
+		Name of the certificate to use. When SSL client authentication is enabled, a certificate name should normally be provided.
+	      </td></tr></tbody></table></div></div><br class="table-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s10.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s12.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">10. Reliability </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 12. Transactions</td></tr></table></div></body></html>

Modified: qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s12.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s12.html?rev=955411&r1=955410&r2=955411&view=diff
==============================================================================
--- qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s12.html (original)
+++ qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch02s12.html Wed Jun 16 22:01:44 2010
@@ -1,109 +1,17 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>12. The AMQP 0-10 mapping</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s11.html" title="11. Transactions"><link rel="next" href="ch03.html" title="Chapter 3. Using the Qpid JMS client"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">12. The AMQP 0-10 mapping</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s11.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch03.html">Next</a></td></tr></table><hr></div><div cla
 ss="section" title="12. The AMQP 0-10 mapping"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="section-amqp0-10-mapping"></a>12. The AMQP 0-10 mapping</h2></div></div></div><p>
-      This section describes the AMQP 0-10 mapping for the Qpid
-      Messaging API.
-    </p><p>
-        The interaction with the broker triggered by creating a sender
-        or receiver depends on what the specified address resolves
-        to. Where the node type is not specified in the address, the
-        client queries the broker to determine whether it refers to a
-        queue or an exchange.
-    </p><p>
-        When sending to a queue, the queue's name is set as the
-        routing key and the message is transfered to the default (or
-        nameless) exchange. When sending to an exchange, the message
-        is transfered to that exchange and the routing key is set to
-        the message subject if one is specified. A default subject may
-        be specified in the target address. The subject may also be
-        set on each message individually to override the default if
-        required. In each case any specified subject is also added as
-        a qpid.subject entry in the application-headers field of the
-        message-properties.
-      </p><p>
-        When receiving from a queue, any subject in the source address
-        is currently ignored. The client sends a message-subscribe
-        request for the queue in question. The accept-mode is
-        determined by the reliability option in the link properties;
-        for unreliable links the accept-mode is none, for reliable
-        links it is explicit. The default for a queue is reliable. The
-        acquire-mode is determined by the value of the mode option. If
-        the mode is set to browse the acquire mode is not-acquired,
-        otherwise it is set to pre-acquired. The exclusive and
-        arguments fields in the message-subscribe command can be
-        controlled using the x-subscribe map.
-      </p><p>
-        When receiving from an exchange, the client creates a
-        subscription queue and binds that to the exchange. The
-        subscription queue's arguments can be specified using the
-        x-declare map within the link properties. The reliability
-        option determines most of the other parameters. If the
-        reliability is set to unreliable then an auto-deleted,
-        exclusive queue is used meaning that if the client or
-        connection fails messages may be lost. For exactly-once the
-        queue is not set to be auto-deleted. The durability of the
-        subscription queue is determined by the durable option in the
-        link properties. The binding process depends on the type of
-        the exchange the source address resolves to.
-      </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
-            For a topic exchange, if no subject is specified and no
-            x-bindings are defined for the link, the subscription
-            queue is bound using a wildcard matching any routing key
-            (thus satisfying the expectation that any message sent to
-            that address will be received from it). If a subject is
-            specified in the source address however, it is used for
-            the binding key (this means that the subject in the source
-            address may be a binding pattern including wildcards).
-          </p></li><li class="listitem"><p>
-            For a fanout exchange the binding key is irrelevant to
-            matching. A receiver created from a source address that
-            resolves to a fanout exchange receives all messages
-            sent to that exchange regardless of any subject the source
-            address may contain. An x-bindings element in the link
-            properties should be used if there is any need to set the
-            arguments to the bind.
-          </p></li><li class="listitem"><p>
-            For a direct exchange, the subject is used as the binding
-            key. If no subject is specified an empty string is used as
-            the binding key.
-          </p></li><li class="listitem"><p>
-            For a headers exchange, if no subject is specified the
-            binding arguments simply contain an x-match entry and no
-            other entries, causing all messages to match. If a subject
-            is specified then the binding arguments contain an x-match
-            entry set to all and an entry for qpid.subject whose value
-            is the subject in the source address (this means the
-            subject in the source address must match the message
-            subject exactly). For more control the x-bindings element
-            in the link properties must be used.
-          </p></li><li class="listitem"><p>
-            For the XML exchange,<sup>[<a name="id2623539" href="#ftn.id2623539" class="footnote">6</a>]</sup> if a subject is specified it is
-            used as the binding key and an XQuery is defined that
-            matches any message with that value for
-            qpid.subject. Again this means that only messages whose
-            subject exactly match that specified in the source address
-            are received. If no subject is specified then the empty
-            string is used as the binding key with an xquery that will
-            match any message (this means that only messages with an
-            empty string as the routing key will be received). For more
-            control the x-bindings element in the link properties must
-            be used. A source address that resolves to the XML
-            exchange must contain either a subject or an x-bindings
-            element in the link properties as there is no way at
-            present to receive any message regardless of routing key.
-          </p></li></ul></div><p>
-        If an x-bindings list is present in the link options a binding
-        is created for each element within that list. Each element is
-        a nested map that may contain values named queue, exchange,
-        key or arguments. If the queue value is absent the queue name
-        the address resolves to is implied. If the exchange value is
-        absent the exchange name the address resolves to is implied.
-      </p><p>The following table shows how Qpid Messaging API message
-        properties are mapped to AMQP 0-10 message properties and
-        delivery properties. In this table <code class="varname">msg</code>
-        refers to the Message class defined in the Qpid Messaging API,
-        <code class="varname">mp</code> refers to an AMQP 0-10
-        <code class="varname">message-properties</code> struct, and
-        <code class="varname">dp</code> refers to an AMQP 0-10
-        <code class="varname">delivery-properties</code> struct.</p><div class="table"><a name="table-amqp0-10-message-properties"></a><p class="title"><b>Table 2.8. Mapping to AMQP 0-10 Message Properties</b></p><div class="table-contents"><table summary="Mapping to AMQP 0-10 Message Properties" width="100%" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Python API</th><th>C++ API</th><th>AMQP 0-10 Property<sup>[<a name="id2623654" href="#ftn.id2623654" class="footnote">a</a>]</sup></th></tr></thead><tbody><tr><td>msg.id</td><td>msg.{get,set}MessageId()</td><td>mp.message_id</td></tr><tr><td>msg.subject</td><td>msg.{get,set}Subject()</td><td>mp.application_headers["qpid.subject"]</td></tr><tr><td>msg.user_id</td><td>msg.{get,set}UserId()</td><td>mp.user_id</td></tr><tr><td>msg.reply_to</td><td>msg.{get,set}ReplyTo()</td><td>mp.reply_to<sup>[<a name="id2623716" href="#ftn.id2623716" class="footnote">b</a>]</sup></td></tr><tr><td>msg.correlation_id</td><td>ms
 g.{get,set}CorrelationId()</td><td>mp.correlation_id</td></tr><tr><td>msg.durable</td><td>msg.{get,set}Durable()</td><td>dp.delivery_mode == delivery_mode.persistent<sup>[<a name="id2623742" href="#ftn.id2623742" class="footnote">c</a>]</sup></td></tr><tr><td>msg.priority</td><td>msg.{get,set}Priority()</td><td>dp.priority</td></tr><tr><td>msg.ttl</td><td>msg.{get,set}Ttl()</td><td>dp.ttl</td></tr><tr><td>msg.redelivered</td><td>msg.{get,set}Redelivered()</td><td>dp.redelivered</td></tr><tr><td>msg.properties</td><td>msg.{get,set}Properties()</td><td>mp.application_headers</td></tr><tr><td>msg.content_type</td><td>msg.{get,set}ContentType()</td><td>mp.content_type</td></tr></tbody><tbody class="footnotes"><tr><td colspan="3"><div class="footnote"><p><sup>[<a name="ftn.id2623654" href="#id2623654" class="para">a</a>] </sup>In these entries, <code class="literal">mp</code> refers to an AMQP message property, and <code class="literal">dp</code> refers to an AMQP delivery proper
 ty.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2623716" href="#id2623716" class="para">b</a>] </sup>The reply_to is converted from the protocol representation into an address.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2623742" href="#id2623742" class="para">c</a>] </sup>Note that msg.durable is a boolean, not an enum.</p></div></td></tr></tbody></table></div></div><br class="table-break"><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.id2623539" href="#id2623539" class="para">6</a>] </sup>Note that the XML
-            exchange is not a standard AMQP exchange type. It is a
-            Qpid extension and is currently only supported by the C++
-            broker.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s11.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">11. Transactions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Using the Qpid JMS client</td></tr></table></div></body></html>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>12. Transactions</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s11.html" title="11. Security"><link rel="next" href="ch02s13.html" title="13. The AMQP 0-10 mapping"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">12. Transactions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s11.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s13.html">Next</a></td></tr></table><hr></div><div class="section" title="12. Tra
 nsactions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2788193"></a>12. Transactions</h2></div></div></div><p>In AMQP, transactions cover the semantics of enqueues and
+      dequeues.</p><p>When sending messages, a transaction tracks enqueues
+      without actually delivering the messages, a commit places
+      messages on their queues, and a rollback discards the
+      enqueues.</p><p>When receiving messages, a transaction tracks dequeues
+      without actually removing acknowledged messages, a commit
+      removes all acknowledged messages, and a rollback discards
+      acknowledgements. A rollback does not release the message, it
+      must be explicitly released to return it to the queue.</p><div class="example"><a name="id2788218"></a><p class="title"><b>Example 2.21. Transactions</b></p><div class="example-contents"><p>C++:</p><pre class="programlisting">
+Connection connection(broker);
+Session session =  connection.createTransactionalSession();
+...
+if (smellsOk())
+   session.commit();
+else 
+   session.rollback();
+   </pre></div></div><br class="example-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s11.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s13.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">11. Security </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 13. The AMQP 0-10 mapping</td></tr></table></div></body></html>

Modified: qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03.html?rev=955411&r1=955410&r2=955411&view=diff
==============================================================================
--- qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03.html (original)
+++ qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03.html Wed Jun 16 22:01:44 2010
@@ -1,9 +1,9 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 3. Using the Qpid JMS client</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="index.html" title="Programming in Apache Qpid"><link rel="prev" href="ch02s12.html" title="12. The AMQP 0-10 mapping"><link rel="next" href="ch03s02.html" title="2. Apache Qpid JNDI Properties for AMQP Messaging"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Using the Qpid JMS client</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s12.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch03s02.html">Next</a></td></tr></table><hr></div><div class
 ="chapter" title="Chapter 3. Using the Qpid JMS client"><div class="titlepage"><div><div><h2 class="title"><a name="QpidJMS"></a>Chapter 3. Using the Qpid JMS client</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch03.html#id2623814">1. A Simple Messaging Program in Java JMS</a></span></dt><dt><span class="section"><a href="ch03s02.html">2. Apache Qpid JNDI Properties for AMQP Messaging</a></span></dt><dd><dl><dt><span class="section"><a href="ch03s02.html#id2624170">2.1. JNDI Properties for Apache Qpid</a></span></dt><dt><span class="section"><a href="ch03s02.html#id2624279">2.2. Connection URLs</a></span></dt></dl></dd><dt><span class="section"><a href="ch03s03.html">3. Java JMS Message Properties</a></span></dt><dt><span class="section"><a href="ch03s04.html">4. JMS MapMessage Types</a></span></dt></dl></div><div class="section" title="1. A Simple Messaging Program in Java JMS"><div class="titlepage"><div>
 <div><h2 class="title" style="clear: both"><a name="id2623814"></a>1. A Simple Messaging Program in Java JMS</h2></div></div></div><p>The following program shows how to use address strings and
-      JNDI for Qpid programs that use Java JMS.</p><p>The Qpid JMS client uses Qpid Messaging API <a class="xref" href="ch02s03.html" title="3. Addresses">Section 3, &#8220;Addresses&#8221;</a> to identify sources and
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 3. Using the Qpid JMS client</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="index.html" title="Programming in Apache Qpid"><link rel="prev" href="ch02s13.html" title="13. The AMQP 0-10 mapping"><link rel="next" href="ch03s02.html" title="2. Apache Qpid JNDI Properties for AMQP Messaging"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Using the Qpid JMS client</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s13.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch03s02.html">Next</a></td></tr></table><hr></div><div class
 ="chapter" title="Chapter 3. Using the Qpid JMS client"><div class="titlepage"><div><div><h2 class="title"><a name="QpidJMS"></a>Chapter 3. Using the Qpid JMS client</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch03.html#id2788645">1. A Simple Messaging Program in Java JMS</a></span></dt><dt><span class="section"><a href="ch03s02.html">2. Apache Qpid JNDI Properties for AMQP Messaging</a></span></dt><dd><dl><dt><span class="section"><a href="ch03s02.html#id2789002">2.1. JNDI Properties for Apache Qpid</a></span></dt><dt><span class="section"><a href="ch03s02.html#id2789111">2.2. Connection URLs</a></span></dt></dl></dd><dt><span class="section"><a href="ch03s03.html">3. Java JMS Message Properties</a></span></dt><dt><span class="section"><a href="ch03s04.html">4. JMS MapMessage Types</a></span></dt><dt><span class="section"><a href="ch03s05.html">5. JMS Client Logging</a></span></dt></dl></div><div class="se
 ction" title="1. A Simple Messaging Program in Java JMS"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2788645"></a>1. A Simple Messaging Program in Java JMS</h2></div></div></div><p>The following program shows how to use address strings and
+      JNDI for Qpid programs that use Java JMS.</p><p>The Qpid JMS client uses Qpid Messaging API <a class="xref" href="ch02s04.html" title="4. Addresses">Section 4, &#8220;Addresses&#8221;</a> to identify sources and
       targets. This program uses a JNDI properties file that defines a
       connection factory for the broker we are using, and the address
       of the topic exchange node that we bind the sender and receiver
-      to. (The syntax of a ConnectionURL is given in <a class="xref" href="ch03s02.html" title="2. Apache Qpid JNDI Properties for AMQP Messaging">Section 2, &#8220;Apache Qpid JNDI Properties for AMQP Messaging&#8221;</a>.)</p><div class="example"><a name="id2623842"></a><p class="title"><b>Example 3.1. JNDI Properties File for "Hello world!" example</b></p><div class="example-contents"><pre class="programlisting">
+      to. (The syntax of a ConnectionURL is given in <a class="xref" href="ch03s02.html" title="2. Apache Qpid JNDI Properties for AMQP Messaging">Section 2, &#8220;Apache Qpid JNDI Properties for AMQP Messaging&#8221;</a>.)</p><div class="example"><a name="id2788674"></a><p class="title"><b>Example 3.1. JNDI Properties File for "Hello world!" example</b></p><div class="example-contents"><pre class="programlisting">
 java.naming.factory.initial 
   = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
 
@@ -12,7 +12,7 @@ connectionfactory.qpidConnectionfactory 
   = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'
 # destination.[jndiname] = [address_string]
 destination.topicExchange = amq.topic
-</pre></div></div><br class="example-break"><p>In the Java JMS code, we use create a JNDI context, use the context to find a connection factory and create and start a connection, create a session, and create a destination that corresponds to the topic exchange. Then we create a sender and a receiver, send a message with the sender, and receive it with the receiver. This code should be straightforward for anyone familiar with Java JMS.</p><div class="example"><a name="id2623857"></a><p class="title"><b>Example 3.2. "Hello world!" in Java</b></p><div class="example-contents"><pre lang="java" class="programlisting">
+</pre></div></div><br class="example-break"><p>In the Java JMS code, we use create a JNDI context, use the context to find a connection factory and create and start a connection, create a session, and create a destination that corresponds to the topic exchange. Then we create a sender and a receiver, send a message with the sender, and receive it with the receiver. This code should be straightforward for anyone familiar with Java JMS.</p><div class="example"><a name="id2788689"></a><p class="title"><b>Example 3.2. "Hello world!" in Java</b></p><div class="example-contents"><pre lang="java" class="programlisting">
 package org.apache.qpid.example.jmsexample.hello;
 
 import javax.jms.*;
@@ -33,32 +33,32 @@ public class Hello {
   private void runTest() {
     try {
       Properties properties = new Properties();
-      properties.load(this.getClass().getResourceAsStream("hello.properties"));  <a class="co" name="hello-java-properties" href="ch03.html#callout-java-properties"><img src="images/callouts/1.png" alt="1" border="0"></a>
-      Context context = new InitialContext(properties);   <a class="co" name="hello-java-context" href="ch03.html#callout-java-context"><img src="images/callouts/2.png" alt="2" border="0"></a>
+      properties.load(this.getClass().getResourceAsStream("hello.properties"));  <a class="co" name="hello-java-properties" href="ch03.html#callout-java-properties">(1)</a>
+      Context context = new InitialContext(properties);   <a class="co" name="hello-java-context" href="ch03.html#callout-java-context">(2)</a>
 
       ConnectionFactory connectionFactory 
-          = (ConnectionFactory) context.lookup("qpidConnectionfactory"); <a class="co" name="hello-java-connection-factory" href="ch03.html#callout-java-connection-factory"><img src="images/callouts/3.png" alt="3" border="0"></a>
-      Connection connection = connectionFactory.createConnection();  <a class="co" name="hello-java-connection" href="ch03.html#callout-java-connection"><img src="images/callouts/4.png" alt="4" border="0"></a>
-      connection.start();  <a class="co" name="hello-java-start" href="ch03.html#callout-java-start"><img src="images/callouts/5.png" alt="5" border="0"></a>
+          = (ConnectionFactory) context.lookup("qpidConnectionfactory"); <a class="co" name="hello-java-connection-factory" href="ch03.html#callout-java-connection-factory">(3)</a>
+      Connection connection = connectionFactory.createConnection();  <a class="co" name="hello-java-connection" href="ch03.html#callout-java-connection">(4)</a>
+      connection.start();  <a class="co" name="hello-java-start" href="ch03.html#callout-java-start">(5)</a>
 
-      Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);<a class="co" name="hello-java-session" href="ch03.html#callout-java-session"><img src="images/callouts/6.png" alt="6" border="0"></a>
-      Destination destination = (Destination) context.lookup("topicExchange");  <a class="co" name="hello-java-destination" href="ch03.html#callout-java-destination"><img src="images/callouts/7.png" alt="7" border="0"></a>
+      Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);<a class="co" name="hello-java-session" href="ch03.html#callout-java-session">(6)</a>
+      Destination destination = (Destination) context.lookup("topicExchange");  <a class="co" name="hello-java-destination" href="ch03.html#callout-java-destination">(7)</a>
 
-      MessageProducer messageProducer = session.createProducer(destination);  <a class="co" name="hello-java-producer" href="ch03.html#callout-java-producer"><img src="images/callouts/8.png" alt="8" border="0"></a>
-      MessageConsumer messageConsumer = session.createConsumer(destination);  <a class="co" name="hello-java-consumer" href="ch03.html#callout-java-consumer"><img src="images/callouts/9.png" alt="9" border="0"></a>
+      MessageProducer messageProducer = session.createProducer(destination);  <a class="co" name="hello-java-producer" href="ch03.html#callout-java-producer">(8)</a>
+      MessageConsumer messageConsumer = session.createConsumer(destination);  <a class="co" name="hello-java-consumer" href="ch03.html#callout-java-consumer">(9)</a>
 
       TextMessage message = session.createTextMessage("Hello world!");
       messageProducer.send(message);
 
-      message = (TextMessage)messageConsumer.receive();    <a class="co" name="hello-java-receive" href="ch03.html#callout-java-receive"><img src="images/callouts/10.png" alt="10" border="0"></a>
+      message = (TextMessage)messageConsumer.receive();    <a class="co" name="hello-java-receive" href="ch03.html#callout-java-receive">(10)</a>
       System.out.println(message.getText());
 
-      connection.close();  <a class="co" name="hello-java-close" href="ch03.html#callout-java-close"><img src="images/callouts/11.png" alt="11" border="0"></a>
-      context.close();   <a class="co" name="hello-java-jndi-close" href="ch03.html#callout-java-jndi-close"><img src="images/callouts/12.png" alt="12" border="0"></a>
+      connection.close();  <a class="co" name="hello-java-close" href="ch03.html#callout-java-close">(11)</a>
+      context.close();   <a class="co" name="hello-java-jndi-close" href="ch03.html#callout-java-jndi-close">(12)</a>
     }
     catch (Exception exp) {
       exp.printStackTrace();
     }
   }
 }
-	</pre></div></div><br class="example-break"><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-properties"></a><a href="#hello-java-properties"><img src="images/callouts/1.png" alt="1" border="0"></a> </p></td><td valign="top" align="left"><p>Loads the JNDI properties file, which specifies connection properties, queues, topics, and addressing options. See <a class="xref" href="ch03s02.html" title="2. Apache Qpid JNDI Properties for AMQP Messaging">Section 2, &#8220;Apache Qpid JNDI Properties for AMQP Messaging&#8221;</a> for details.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-context"></a><a href="#hello-java-context"><img src="images/callouts/2.png" alt="2" border="0"></a> </p></td><td valign="top" align="left"><p>Creates the JNDI initial context.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-connection-factory
 "></a><a href="#hello-java-connection-factory"><img src="images/callouts/3.png" alt="3" border="0"></a> </p></td><td valign="top" align="left"><p>Creates a JMS connection factory for Qpid.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-connection"></a><a href="#hello-java-connection"><img src="images/callouts/4.png" alt="4" border="0"></a> </p></td><td valign="top" align="left"><p>Creates a JMS connection.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-start"></a><a href="#hello-java-start"><img src="images/callouts/5.png" alt="5" border="0"></a> </p></td><td valign="top" align="left"><p>Activates the connection.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-session"></a><a href="#hello-java-session"><img src="images/callouts/6.png" alt="6" border="0"></a> </p></td><td valign="top" align="left"><p>Creates a session. This session is not transactional (transactions='fal
 se'), and messages are automatically acknowledged.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-destination"></a><a href="#hello-java-destination"><img src="images/callouts/7.png" alt="7" border="0"></a> </p></td><td valign="top" align="left"><p>Creates a destination for the topic exchange, so senders and receivers can use it.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-producer"></a><a href="#hello-java-producer"><img src="images/callouts/8.png" alt="8" border="0"></a> </p></td><td valign="top" align="left"><p>Creates a producer that sends messages to the topic exchange.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-consumer"></a><a href="#hello-java-consumer"><img src="images/callouts/9.png" alt="9" border="0"></a> </p></td><td valign="top" align="left"><p>Creates a consumer that reads messages from the topic exchange.</p></td></tr><tr><td width="5%" valign="to
 p" align="left"><p><a name="callout-java-receive"></a><a href="#hello-java-receive"><img src="images/callouts/10.png" alt="10" border="0"></a> </p></td><td valign="top" align="left"><p>Reads the next available message.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-close"></a><a href="#hello-java-close"><img src="images/callouts/11.png" alt="11" border="0"></a> </p></td><td valign="top" align="left"><p>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-jndi-close"></a><a href="#hello-java-jndi-close"><img src="images/callouts/12.png" alt="12" border="0"></a> </p></td><td valign="top" align="left"><p>Closes the JNDI context.</p></td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="c
 h02s12.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch03s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12. The AMQP 0-10 mapping </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2. Apache Qpid JNDI Properties for AMQP Messaging</td></tr></table></div></body></html>
+	</pre></div></div><br class="example-break"><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-properties"></a><a href="#hello-java-properties">(1)</a> </p></td><td valign="top" align="left"><p>Loads the JNDI properties file, which specifies connection properties, queues, topics, and addressing options. See <a class="xref" href="ch03s02.html" title="2. Apache Qpid JNDI Properties for AMQP Messaging">Section 2, &#8220;Apache Qpid JNDI Properties for AMQP Messaging&#8221;</a> for details.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-context"></a><a href="#hello-java-context">(2)</a> </p></td><td valign="top" align="left"><p>Creates the JNDI initial context.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-connection-factory"></a><a href="#hello-java-connection-factory">(3)</a> </p></td><td valign="top" align="left"><p>C
 reates a JMS connection factory for Qpid.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-connection"></a><a href="#hello-java-connection">(4)</a> </p></td><td valign="top" align="left"><p>Creates a JMS connection.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-start"></a><a href="#hello-java-start">(5)</a> </p></td><td valign="top" align="left"><p>Activates the connection.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-session"></a><a href="#hello-java-session">(6)</a> </p></td><td valign="top" align="left"><p>Creates a session. This session is not transactional (transactions='false'), and messages are automatically acknowledged.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-destination"></a><a href="#hello-java-destination">(7)</a> </p></td><td valign="top" align="left"><p>Creates a destination for the topic exchange, so senders an
 d receivers can use it.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-producer"></a><a href="#hello-java-producer">(8)</a> </p></td><td valign="top" align="left"><p>Creates a producer that sends messages to the topic exchange.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-consumer"></a><a href="#hello-java-consumer">(9)</a> </p></td><td valign="top" align="left"><p>Creates a consumer that reads messages from the topic exchange.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-receive"></a><a href="#hello-java-receive">(10)</a> </p></td><td valign="top" align="left"><p>Reads the next available message.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-close"></a><a href="#hello-java-close">(11)</a> </p></td><td valign="top" align="left"><p>Closes the connection, all sessions managed by the connection, and all senders and receivers manage
 d by each session.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-java-jndi-close"></a><a href="#hello-java-jndi-close">(12)</a> </p></td><td valign="top" align="left"><p>Closes the JNDI context.</p></td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s13.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch03s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">13. The AMQP 0-10 mapping </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2. Apache Qpid JNDI Properties for AMQP Messaging</td></tr></table></div></body></html>

Modified: qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03s02.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03s02.html?rev=955411&r1=955410&r2=955411&view=diff
==============================================================================
--- qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03s02.html (original)
+++ qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03s02.html Wed Jun 16 22:01:44 2010
@@ -1,6 +1,6 @@
 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2. Apache Qpid JNDI Properties for AMQP Messaging</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch03.html" title="Chapter 3. Using the Qpid JMS client"><link rel="prev" href="ch03.html" title="Chapter 3. Using the Qpid JMS client"><link rel="next" href="ch03s03.html" title="3. Java JMS Message Properties"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2. Apache Qpid JNDI Properties for AMQP Messaging</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using the Qpid JMS client</th><td width="20%" align="right"> <a accesskey="n" href="ch
 03s03.html">Next</a></td></tr></table><hr></div><div class="section" title="2. Apache Qpid JNDI Properties for AMQP Messaging"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="QpidJNDI"></a>2. Apache Qpid JNDI Properties for AMQP Messaging</h2></div></div></div><p>
 	Apache Qpid defines JNDI properties that can be used to specify JMS Connections and Destinations. Here is a typical JNDI properties file:
-      </p><div class="example"><a name="id2624148"></a><p class="title"><b>Example 3.3. JNDI Properties File</b></p><div class="example-contents"><pre class="programlisting">
+      </p><div class="example"><a name="id2788980"></a><p class="title"><b>Example 3.3. JNDI Properties File</b></p><div class="example-contents"><pre class="programlisting">
 java.naming.factory.initial 
   = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
 
@@ -9,9 +9,9 @@ connectionfactory.qpidConnectionfactory 
   = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'
 # destination.[jndiname] = [address_string]
 destination.topicExchange = amq.topic
-</pre></div></div><br class="example-break"><p>The following sections describe the JNDI properties that Qpid uses.</p><div class="section" title="2.1. JNDI Properties for Apache Qpid"><div class="titlepage"><div><div><h3 class="title"><a name="id2624170"></a>2.1. JNDI Properties for Apache Qpid</h3></div></div></div><p>
+</pre></div></div><br class="example-break"><p>The following sections describe the JNDI properties that Qpid uses.</p><div class="section" title="2.1. JNDI Properties for Apache Qpid"><div class="titlepage"><div><div><h3 class="title"><a name="id2789002"></a>2.1. JNDI Properties for Apache Qpid</h3></div></div></div><p>
 	  Apache Qpid supports the properties shown in the following table:
-        </p><div class="table"><a name="id2624180"></a><p class="title"><b>Table 3.1. JNDI Properties supported by Apache Qpid</b></p><div class="table-contents"><table summary="JNDI Properties supported by Apache Qpid" border="1"><colgroup><col><col></colgroup><thead><tr><th>
+        </p><div class="table"><a name="id2789012"></a><p class="title"><b>Table 3.1. JNDI Properties supported by Apache Qpid</b></p><div class="table-contents"><table summary="JNDI Properties supported by Apache Qpid" border="1"><colgroup><col><col></colgroup><thead><tr><th>
 		  Property
 	        </th><th>
 		  Purpose
@@ -41,12 +41,12 @@ destination.topicExchange = amq.topic
 		    queues, topics and header matching, using an
 		    address string.  
 
-		    <sup>[<a name="id2624265" href="#ftn.id2624265" class="footnote">a</a>]</sup>
+		    <sup>[<a name="id2789097" href="#ftn.id2789097" class="footnote">a</a>]</sup>
 		  </p>
-	        </td></tr></tbody><tbody class="footnotes"><tr><td colspan="2"><div class="footnote"><p><sup>[<a name="ftn.id2624265" href="#id2624265" class="para">a</a>] </sup>Binding URLs, which were used in
+	        </td></tr></tbody><tbody class="footnotes"><tr><td colspan="2"><div class="footnote"><p><sup>[<a name="ftn.id2789097" href="#id2789097" class="para">a</a>] </sup>Binding URLs, which were used in
 		    earlier versions of the Qpid Java JMS client, can
 		    still be used instead of address
-		    strings.</p></div></td></tr></tbody></table></div></div><br class="table-break"></div><div class="section" title="2.2. Connection URLs"><div class="titlepage"><div><div><h3 class="title"><a name="id2624279"></a>2.2. Connection URLs</h3></div></div></div><p>
+		    strings.</p></div></td></tr></tbody></table></div></div><br class="table-break"></div><div class="section" title="2.2. Connection URLs"><div class="titlepage"><div><div><h3 class="title"><a name="id2789111"></a>2.2. Connection URLs</h3></div></div></div><p>
 	  In JNDI properties, a Connection URL specifies properties for a connection. The format for a Connection URL is:
         </p><pre class="programlisting">amqp://[&lt;user&gt;:&lt;pass&gt;@][&lt;clientid&gt;]&lt;virtualhost&gt;[?&lt;option&gt;='&lt;value&gt;'[&amp;&lt;option&gt;='&lt;value&gt;']]
         </pre><p>
@@ -54,7 +54,7 @@ destination.topicExchange = amq.topic
         </p><pre class="programlisting">amqp://username:password@clientid/test?brokerlist='tcp://localhost:5672'
         </pre><p>
 	  Apache Qpid supports the following properties in Connection URLs:
-        </p><div class="table"><a name="id2624321"></a><p class="title"><b>Table 3.2. Connection URL Properties</b></p><div class="table-contents"><table summary="Connection URL Properties" width="100%" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>
+        </p><div class="table"><a name="id2789152"></a><p class="title"><b>Table 3.2. Connection URL Properties</b></p><div class="table-contents"><table summary="Connection URL Properties" width="100%" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>
 		  Option
 	        </th><th>
 		  Type
@@ -104,13 +104,13 @@ destination.topicExchange = amq.topic
         </p><pre class="programlisting">brokerlist='tcp://localhost:5672'
         </pre><p>
 	  A broker list can contain more than one broker address; if so, the connection is made to the first broker in the list that is available. In general, it is better to use the failover exchange when using multiple brokers, since it allows applications to fail over if a broker goes down.
-	</p><div class="example"><a name="id2624482"></a><p class="title"><b>Example 3.4. Broker Lists</b></p><div class="example-contents"><p>A broker list can specify properties to be used when connecting to the broker, such as security options. This broker list specifies options for a Kerberos connection using GSSAPI:</p><pre class="programlisting">
+	</p><div class="example"><a name="id2789314"></a><p class="title"><b>Example 3.4. Broker Lists</b></p><div class="example-contents"><p>A broker list can specify properties to be used when connecting to the broker, such as security options. This broker list specifies options for a Kerberos connection using GSSAPI:</p><pre class="programlisting">
 amqp://guest:guest@test/test?sync_ack='true'
     &amp;brokerlist='tcp://ip1:5672?sasl_mechs='GSSAPI'
 	</pre><p>This broker list specifies SSL options:</p><pre class="programlisting">
 amqp://guest:guest@test/test?sync_ack='true'
    &amp;brokerlist='tcp://ip1:5672?ssl='true'&amp;ssl_cert_alias='cert1'
-	</pre></div></div><br class="example-break"><p>The following broker list options are supported.</p><div class="table"><a name="id2624518"></a><p class="title"><b>Table 3.3. Broker List Options</b></p><div class="table-contents"><table summary="Broker List Options" width="100%" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>
+	</pre></div></div><br class="example-break"><p>The following broker list options are supported.</p><div class="table"><a name="id2789350"></a><p class="title"><b>Table 3.3. Broker List Options</b></p><div class="table-contents"><table summary="Broker List Options" width="100%" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>
 		  Option
 	        </th><th>
 		  Type

Modified: qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03s03.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03s03.html?rev=955411&r1=955410&r2=955411&view=diff
==============================================================================
--- qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03s03.html (original)
+++ qpid/site/docs/books/0.5/Programming-In-Apache-Qpid/html/ch03s03.html Wed Jun 16 22:01:44 2010
@@ -1,8 +1,8 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3. Java JMS Message Properties</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch03.html" title="Chapter 3. Using the Qpid JMS client"><link rel="prev" href="ch03s02.html" title="2. Apache Qpid JNDI Properties for AMQP Messaging"><link rel="next" href="ch03s04.html" title="4. JMS MapMessage Types"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3. Java JMS Message Properties</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using the Qpid JMS client</th><td width="20%" align="right"> <a accesskey="n" href="ch03s04.html">Next</a></td></
 tr></table><hr></div><div class="section" title="3. Java JMS Message Properties"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2624788"></a>3. Java JMS Message Properties</h2></div></div></div><p>The following table shows how Qpid Messaging API message
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3. Java JMS Message Properties</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch03.html" title="Chapter 3. Using the Qpid JMS client"><link rel="prev" href="ch03s02.html" title="2. Apache Qpid JNDI Properties for AMQP Messaging"><link rel="next" href="ch03s04.html" title="4. JMS MapMessage Types"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3. Java JMS Message Properties</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using the Qpid JMS client</th><td width="20%" align="right"> <a accesskey="n" href="ch03s04.html">Next</a></td></
 tr></table><hr></div><div class="section" title="3. Java JMS Message Properties"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2789620"></a>3. Java JMS Message Properties</h2></div></div></div><p>The following table shows how Qpid Messaging API message
         properties are mapped to AMQP 0-10 message properties and
         delivery properties. In this table <code class="varname">msg</code>
         refers to the Message class defined in the Qpid Messaging API,
         <code class="varname">mp</code> refers to an AMQP 0-10
         <code class="varname">message-properties</code> struct, and
         <code class="varname">dp</code> refers to an AMQP 0-10
-        <code class="varname">delivery-properties</code> struct.</p><div class="table"><a name="id2624819"></a><p class="title"><b>Table 3.4. Java JMS Mapping to AMQP 0-10 Message Properties</b></p><div class="table-contents"><table summary="Java JMS Mapping to AMQP 0-10 Message Properties" border="1"><colgroup><col><col></colgroup><thead><tr><th>Java JMS Message Property</th><th>AMQP 0-10 Property<sup>[<a name="id2624839" href="#ftn.id2624839" class="footnote">a</a>]</sup></th></tr></thead><tbody><tr><td>JMSMessageID</td><td>mp.message_id</td></tr><tr><td>qpid.subject<sup>[<a name="id2624872" href="#ftn.id2624872" class="footnote">b</a>]</sup></td><td>mp.application_headers["qpid.subject"]</td></tr><tr><td>JMSXUserID</td><td>mp.user_id</td></tr><tr><td>JMSReplyTo</td><td>mp.reply_to<sup>[<a name="id2624897" href="#ftn.id2624897" class="footnote">c</a>]</sup></td></tr><tr><td>JMSCorrelationID</td><td>mp.correlation_id</td></tr><tr><td>JMSDeliveryMode</td><td>dp.delivery_mo
 de</td></tr><tr><td>JMSPriority</td><td>dp.priority</td></tr><tr><td>JMSExpiration</td><td>dp.ttl<sup>[<a name="id2624935" href="#ftn.id2624935" class="footnote">d</a>]</sup></td></tr><tr><td>JMSRedelivered</td><td>dp.redelivered</td></tr><tr><td>JMS Properties</td><td>mp.application_headers</td></tr><tr><td>JMSType</td><td>mp.content_type</td></tr></tbody><tbody class="footnotes"><tr><td colspan="2"><div class="footnote"><p><sup>[<a name="ftn.id2624839" href="#id2624839" class="para">a</a>] </sup>In these entries, <code class="literal">mp</code> refers to an AMQP message property, and <code class="literal">dp</code> refers to an AMQP delivery property.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2624872" href="#id2624872" class="para">b</a>] </sup>This is a custom JMS property, set automatically by the Java JMS client implementation.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2624897" href="#id2624897" class="para">c</a>] </sup>The reply_to is convert
 ed from the protocol representation into an address.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2624935" href="#id2624935" class="para">d</a>] </sup>JMSExpiration = dp.ttl + currentTime</p></div></td></tr></tbody></table></div></div><br class="table-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2. Apache Qpid JNDI Properties for AMQP Messaging </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4. JMS MapMessage Types</td></tr></table></div></body></html>
+        <code class="varname">delivery-properties</code> struct.</p><div class="table"><a name="id2789650"></a><p class="title"><b>Table 3.4. Java JMS Mapping to AMQP 0-10 Message Properties</b></p><div class="table-contents"><table summary="Java JMS Mapping to AMQP 0-10 Message Properties" border="1"><colgroup><col><col></colgroup><thead><tr><th>Java JMS Message Property</th><th>AMQP 0-10 Property<sup>[<a name="id2789670" href="#ftn.id2789670" class="footnote">a</a>]</sup></th></tr></thead><tbody><tr><td>JMSMessageID</td><td>mp.message_id</td></tr><tr><td>qpid.subject<sup>[<a name="id2789704" href="#ftn.id2789704" class="footnote">b</a>]</sup></td><td>mp.application_headers["qpid.subject"]</td></tr><tr><td>JMSXUserID</td><td>mp.user_id</td></tr><tr><td>JMSReplyTo</td><td>mp.reply_to<sup>[<a name="id2789729" href="#ftn.id2789729" class="footnote">c</a>]</sup></td></tr><tr><td>JMSCorrelationID</td><td>mp.correlation_id</td></tr><tr><td>JMSDeliveryMode</td><td>dp.delivery_mo
 de</td></tr><tr><td>JMSPriority</td><td>dp.priority</td></tr><tr><td>JMSExpiration</td><td>dp.ttl<sup>[<a name="id2789767" href="#ftn.id2789767" class="footnote">d</a>]</sup></td></tr><tr><td>JMSRedelivered</td><td>dp.redelivered</td></tr><tr><td>JMS Properties</td><td>mp.application_headers</td></tr><tr><td>JMSType</td><td>mp.content_type</td></tr></tbody><tbody class="footnotes"><tr><td colspan="2"><div class="footnote"><p><sup>[<a name="ftn.id2789670" href="#id2789670" class="para">a</a>] </sup>In these entries, <code class="literal">mp</code> refers to an AMQP message property, and <code class="literal">dp</code> refers to an AMQP delivery property.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2789704" href="#id2789704" class="para">b</a>] </sup>This is a custom JMS property, set automatically by the Java JMS client implementation.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2789729" href="#id2789729" class="para">c</a>] </sup>The reply_to is convert
 ed from the protocol representation into an address.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2789767" href="#id2789767" class="para">d</a>] </sup>JMSExpiration = dp.ttl + currentTime</p></div></td></tr></tbody></table></div></div><br class="table-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2. Apache Qpid JNDI Properties for AMQP Messaging </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4. JMS MapMessage Types</td></tr></table></div></body></html>



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org