http://git-wip-us.apache.org/repos/asf/qpid-site/blob/1c801de7/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Example.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Example.html b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Example.html new file mode 100644 index 0000000..19cf06c --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Example.html @@ -0,0 +1,221 @@ +<!DOCTYPE html> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>Chapter 1. HelloWorld Example - Apache Qpid™</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <link rel="stylesheet" href="/site.css" type="text/css" async="async"/> + <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/> + <script type="text/javascript">var _deferredFunctions = [];</script> + <script type="text/javascript" src="/deferred.js" defer="defer"></script> + <!--[if lte IE 8]> + <link rel="stylesheet" href="/ie.css" type="text/css"/> + <script type="text/javascript" src="/html5shiv.js"></script> + <![endif]--> + + <!-- Redirects for `go get` and godoc.org --> + <meta name="go-import" + content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/> + <meta name="go-source" + content="qpid.apache.org +https://github.com/apache/qpid-proton/blob/go1/README.md +https://github.com/apache/qpid-proton/tree/go1{/dir} +https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/> + </head> + <body> + <div id="-content"> + <div id="-top" class="panel"> + <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a> + + <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a> + + <ul id="-global-navigation"> + <li><a id="-logotype" href="/index.html">Apache Qpid<sup>™</sup></a></li> + <li><a href="/documentation.html">Documentation</a></li> + <li><a href="/download.html">Download</a></li> + <li><a href="/discussion.html">Discussion</a></li> + </ul> + </div> + + <div id="-menu" class="panel" style="display: none;"> + <div class="flex"> + <section> + <h3>Project</h3> + + <ul> + <li><a href="/overview.html">Overview</a></li> + <li><a href="/components/index.html">Components</a></li> + <li><a href="/releases/index.html">Releases</a></li> + </ul> + </section> + + <section> + <h3>Messaging APIs</h3> + + <ul> + <li><a href="/proton/index.html">Qpid Proton</a></li> + <li><a href="/components/jms/index.html">Qpid JMS</a></li> + <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li> + </ul> + </section> + + <section> + <h3>Servers and tools</h3> + + <ul> + <li><a href="/components/broker-j/index.html">Broker-J</a></li> + <li><a href="/components/cpp-broker/index.html">C++ broker</a></li> + <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li> + </ul> + </section> + + <section> + <h3>Resources</h3> + + <ul> + <li><a href="/dashboard.html">Dashboard</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li> + <li><a href="/resources.html">More resources</a></li> + </ul> + </section> + </div> + </div> + + <div id="-search" class="panel" style="display: none;"> + <form action="http://www.google.com/search" method="get"> + <input type="hidden" name="sitesearch" value="qpid.apache.org"/> + <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/> + <button type="submit">Search</button> + <a href="/search.html">More ways to search</a> + </form> + </div> + + <div id="-middle" class="panel"> + <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/index.html">Qpid JMS AMQP 0-x 6.3.0</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/index.html">Apache Qpid JMS Client for AMQP 0-10</a></li><li>Chapter 1. HelloWorld Example</li></ul> + + <div id="-middle-content"> + <div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Chapter 1. HelloWorld Example</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-10-Book.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-10-Configuring.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="JMS-Client-0-10-Example"></a>Chapter 1. HelloWorld Example</h1></div></div></div><p>The following program shows how to send and receive a + message using the Apache Qpid JMS client for AMQP 0-10 . JMS programs typically use + JNDI to obtain connection factory and destination objects which + the application needs. In this way the configuration is kept + separate from the application code itself.</p><p>In this example, we create a JNDI context using a + properties file, use the context to lookup a connection factory, + create and start a connection, create a session, and lookup a + destination from the JNDI context. Then we create a producer and + a consumer, send a message with the producer and receive it with + the consumer. This code should be straightforward for anyone + familiar with JMS.</p><div class="example"><a id="d0e12"></a><p class="title"><strong>Example 1.1. "Hello world!" in Java</strong></p><div class="example-contents"><pre class="programlisting" xml:lang="java"> +package org.apache.qpid.example.jmsexample.hello; + +import javax.jms.*; +import javax.naming.Context; +import javax.naming.InitialContext; +import java.util.Properties; + +public class Hello { + + public Hello() { + } + + public static void main(String[] args) { + Hello producer = new Hello(); + producer.runTest(); + } + + private void runTest() { + try { + Properties properties = new Properties(); + properties.load(this.getClass().getResourceAsStream("hello.properties")); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-properties" id="hello-java-properties"><span><img alt="1" border="0" src="images/callouts/1.png" /></span></a> + Context context = new InitialContext(properties); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-context" id="hello-java-context"><span><img alt="2" border="0" src="images/callouts/2.png" /></span></a> + + ConnectionFactory connectionFactory + = (ConnectionFactory) context.lookup("qpidConnectionfactory"); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-connection-factory" id="hello-java-connection-factory"><span><img alt="3" border="0" src="images/callouts/3.png" /></span></a> + Connection connection = connectionFactory.createConnection(); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-connection" id="hello-java-connection"><span><img alt="4" border="0" src="images/callouts/4.png" /></span></a> + connection.start(); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-start" id="hello-java-start"><span><img alt="5" border="0" src="images/callouts/5.png" /></span></a> + + Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);<a class="co" href="JMS-Client-0-10-Example.html#callout-java-session" id="hello-java-session"><span><img alt="6" border="0" src="images/callouts/6.png" /></span></a> + Destination destination = (Destination) context.lookup("topicExchange"); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-destination" id="hello-java-destination"><span><img alt="7" border="0" src="images/callouts/7.png" /></span></a> + + MessageProducer messageProducer = session.createProducer(destination); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-producer" id="hello-java-producer"><span><img alt="8" border="0" src="images/callouts/8.png" /></span></a> + MessageConsumer messageConsumer = session.createConsumer(destination); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-consumer" id="hello-java-consumer"><span><img alt="9" border="0" src="images/callouts/9.png" /></span></a> + + TextMessage message = session.createTextMessage("Hello world!"); + messageProducer.send(message); + + message = (TextMessage)messageConsumer.receive(); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-receive" id="hello-java-receive"><span><img alt="10" border="0" src="images/callouts/10.png" /></span></a> + System.out.println(message.getText()); + + connection.close(); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-close" id="hello-java-close"><span><img alt="11" border="0" src="images/callouts/11.png" /></span></a> + context.close(); <a class="co" href="JMS-Client-0-10-Example.html#callout-java-jndi-close" id="hello-java-jndi-close"><span><img alt="12" border="0" src="images/callouts/12.png" /></span></a> + } + catch (Exception exp) { + exp.printStackTrace(); + } + } +} +</pre></div></div><br class="example-break" /><div class="calloutlist"><table border="0" summary="Callout list"><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-properties"></a><a href="#hello-java-properties"><span><img alt="1" border="0" src="images/callouts/1.png" /></span></a> </p></td><td align="left" valign="top"><p>Loads the JNDI properties file, which specifies connection properties, queues, topics, and addressing options. See below for further details.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-context"></a><a href="#hello-java-context"><span><img alt="2" border="0" src="images/callouts/2.png" /></span></a> </p></td><td align="left" valign="top"><p>Creates the JNDI initial context.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-connection-factory"></a><a href="#hello-java-connection-factory"><span><img alt="3" border="0" src="images/callouts/3.png" /></span></a> </p></td><td align="le ft" valign="top"><p>Creates a JMS connection factory for Qpid.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-connection"></a><a href="#hello-java-connection"><span><img alt="4" border="0" src="images/callouts/4.png" /></span></a> </p></td><td align="left" valign="top"><p>Creates a JMS connection.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-start"></a><a href="#hello-java-start"><span><img alt="5" border="0" src="images/callouts/5.png" /></span></a> </p></td><td align="left" valign="top"><p>Activates the connection.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-session"></a><a href="#hello-java-session"><span><img alt="6" border="0" src="images/callouts/6.png" /></span></a> </p></td><td align="left" valign="top"><p>Creates a session. This session is not transactional (transactions='false'), and messages are automatically acknowledged.</p></td></tr><tr><td align="left" valign="to p" width="5%"><p><a id="callout-java-destination"></a><a href="#hello-java-destination"><span><img alt="7" border="0" src="images/callouts/7.png" /></span></a> </p></td><td align="left" valign="top"><p>Creates a destination for the topic exchange, so senders and receivers can use it.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-producer"></a><a href="#hello-java-producer"><span><img alt="8" border="0" src="images/callouts/8.png" /></span></a> </p></td><td align="left" valign="top"><p>Creates a producer that sends messages to the topic exchange.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-consumer"></a><a href="#hello-java-consumer"><span><img alt="9" border="0" src="images/callouts/9.png" /></span></a> </p></td><td align="left" valign="top"><p>Creates a consumer that reads messages from the topic exchange.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-receive"></a><a href="#he llo-java-receive"><span><img alt="10" border="0" src="images/callouts/10.png" /></span></a> </p></td><td align="left" valign="top"><p>Reads the next available message.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-close"></a><a href="#hello-java-close"><span><img alt="11" border="0" src="images/callouts/11.png" /></span></a> </p></td><td align="left" valign="top"><p>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-java-jndi-close"></a><a href="#hello-java-jndi-close"><span><img alt="12" border="0" src="images/callouts/12.png" /></span></a> </p></td><td align="left" valign="top"><p>Closes the JNDI context.</p></td></tr></table></div><p>The contents of the hello.properties file are shown below.</p><div class="example"><a id="d0e80"></a><p class="title"><strong>Example 1.2. JNDI Properties File for "Hello world!" example</strong></p><div class="example-contents"><pre class="programlisting"> +java.naming.factory.initial += org.apache.qpid.jndi.PropertiesFileInitialContextFactory + +# connectionfactory.[jndiname] = [ConnectionURL] +connectionfactory.qpidConnectionfactory += amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672' <a class="co" href="JMS-Client-0-10-Example.html#callout-hello-properties-connectionfactory" id="hello-properties-connectionfactory"><span><img alt="1" border="0" src="images/callouts/1.png" /></span></a> +# destination.[jndiname] = [address_string] +destination.topicExchange = amq.topic <a class="co" href="JMS-Client-0-10-Example.html#callout-hello-properties-destination" id="hello-properties-destination"><span><img alt="2" border="0" src="images/callouts/2.png" /></span></a> + </pre></div></div><br class="example-break" /><div class="calloutlist"><table border="0" summary="Callout list"><tr><td align="left" valign="top" width="5%"><p><a id="callout-hello-properties-connectionfactory"></a><a href="#hello-properties-connectionfactory"><span><img alt="1" border="0" src="images/callouts/1.png" /></span></a> </p></td><td align="left" valign="top"><p>Defines a connection factory from which connections + can be created. The syntax of a ConnectionURL is given in + <a class="xref" href="JMS-Client-0-10-Configuring-JNDI.html" title="2.2. JNDI Properties">Section 2.2, “JNDI Properties”</a>.</p></td></tr><tr><td align="left" valign="top" width="5%"><p><a id="callout-hello-properties-destination"></a><a href="#hello-properties-destination"><span><img alt="2" border="0" src="images/callouts/2.png" /></span></a> </p></td><td align="left" valign="top"><p>Defines a destination for which MessageProducers + and/or MessageConsumers can be created to send and receive + messages. The value for the destination in the properties + file is an address string as described in + <a class="xref" href="JMS-Client-0-10-Configuring-Addresses.html" title="2.4. Addresses">Section 2.4, “Addresses”</a>. In the JMS + implementation MessageProducers are analogous to senders in + the Qpid Message API, and MessageConsumers are analogous to + receivers.</p></td></tr></table></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-10-Book.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-10-Configuring.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">Apache Qpid JMS Client for AMQP 0-10 </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-0-10-Book.html">Home</a></td><td align="right" valign="top" width="40%"> Chapter 2. Configuring the Client</td></tr></table></div></div> + + <hr/> + + <ul id="-apache-navigation"> + <li><a href="http://www.apache.org/">Apache</a></li> + <li><a href="http://www.apache.org/licenses/">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li> + <li><a href="/security.html">Security</a></li> + <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li> + </ul> + + <p id="-legal"> + Apache Qpid, Messaging built on AMQP; Copyright © 2015 + The Apache Software Foundation; Licensed under + the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache + License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton, + Proton, Apache, the Apache feather logo, and the Apache Qpid + project logo are trademarks of The Apache Software + Foundation; All other marks mentioned may be trademarks or + registered trademarks of their respective owners + </p> + </div> + </div> + </div> + </body> +</html>
http://git-wip-us.apache.org/repos/asf/qpid-site/blob/1c801de7/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Miscellaneous-MapMessages.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Miscellaneous-MapMessages.html b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Miscellaneous-MapMessages.html new file mode 100644 index 0000000..ceba965 --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Miscellaneous-MapMessages.html @@ -0,0 +1,191 @@ +<!DOCTYPE html> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>3.2. JMS MapMessage Types - Apache Qpid™</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <link rel="stylesheet" href="/site.css" type="text/css" async="async"/> + <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/> + <script type="text/javascript">var _deferredFunctions = [];</script> + <script type="text/javascript" src="/deferred.js" defer="defer"></script> + <!--[if lte IE 8]> + <link rel="stylesheet" href="/ie.css" type="text/css"/> + <script type="text/javascript" src="/html5shiv.js"></script> + <![endif]--> + + <!-- Redirects for `go get` and godoc.org --> + <meta name="go-import" + content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/> + <meta name="go-source" + content="qpid.apache.org +https://github.com/apache/qpid-proton/blob/go1/README.md +https://github.com/apache/qpid-proton/tree/go1{/dir} +https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/> + </head> + <body> + <div id="-content"> + <div id="-top" class="panel"> + <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a> + + <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a> + + <ul id="-global-navigation"> + <li><a id="-logotype" href="/index.html">Apache Qpid<sup>™</sup></a></li> + <li><a href="/documentation.html">Documentation</a></li> + <li><a href="/download.html">Download</a></li> + <li><a href="/discussion.html">Discussion</a></li> + </ul> + </div> + + <div id="-menu" class="panel" style="display: none;"> + <div class="flex"> + <section> + <h3>Project</h3> + + <ul> + <li><a href="/overview.html">Overview</a></li> + <li><a href="/components/index.html">Components</a></li> + <li><a href="/releases/index.html">Releases</a></li> + </ul> + </section> + + <section> + <h3>Messaging APIs</h3> + + <ul> + <li><a href="/proton/index.html">Qpid Proton</a></li> + <li><a href="/components/jms/index.html">Qpid JMS</a></li> + <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li> + </ul> + </section> + + <section> + <h3>Servers and tools</h3> + + <ul> + <li><a href="/components/broker-j/index.html">Broker-J</a></li> + <li><a href="/components/cpp-broker/index.html">C++ broker</a></li> + <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li> + </ul> + </section> + + <section> + <h3>Resources</h3> + + <ul> + <li><a href="/dashboard.html">Dashboard</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li> + <li><a href="/resources.html">More resources</a></li> + </ul> + </section> + </div> + </div> + + <div id="-search" class="panel" style="display: none;"> + <form action="http://www.google.com/search" method="get"> + <input type="hidden" name="sitesearch" value="qpid.apache.org"/> + <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/> + <button type="submit">Search</button> + <a href="/search.html">More ways to search</a> + </form> + </div> + + <div id="-middle" class="panel"> + <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/index.html">Qpid JMS AMQP 0-x 6.3.0</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/index.html">Apache Qpid JMS Client for AMQP 0-10</a></li><li>3.2. JMS MapMessage Types</li></ul> + + <div id="-middle-content"> + <div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.2. JMS MapMessage Types</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-10-Miscellaneous.html">Prev</a> </td><th align="center" width="60%">Chapter 3. Miscellaneous</th><td align="right" width="20%"> </td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="JMS-Client-0-10-Miscellaneous-MapMessages"></a>3.2. JMS MapMessage Types</h2></div></div></div><p>Qpid supports the JMS <code class="classname">MapMessage</code> interface, which provides support for maps in messages. The following code shows how to send a <code class="classname">MapMessage</code> in JMS.</p><div class="example"><a id="d0e2269"></a><p class="title"><strong>Example 3.1. Sending a JMS MapMessage</strong></p><div class="example-contents"><pr e class="programlisting"> + import java.util.ArrayList; + import java.util.HashMap; + import java.util.List; + import java.util.Map; + + import javax.jms.Connection; + import javax.jms.Destination; + import javax.jms.MapMessage; + import javax.jms.MessageProducer; + import javax.jms.Session; + + import java.util.Arrays; + + // !!! SNIP !!! + + MessageProducer producer = session.createProducer(queue); + + MapMessage m = session.createMapMessage(); + m.setIntProperty("Id", 987654321); + m.setStringProperty("name", "Widget"); + m.setDoubleProperty("price", 0.99); + + List<String> colors = new ArrayList<String>(); + colors.add("red"); + colors.add("green"); + colors.add("white"); + m.setObject("colours", colors); + + Map<String,Double> dimensions = new HashMap<String,Double>(); + dimensions.put("length",10.2); + dimensions.put("width",5.1); + dimensions.put("depth",2.0); + m.setObject("dimensions",dimensions); + + List<List<Integer>> parts = new ArrayList<List<Integer>>(); + parts.add(Arrays.asList(new Integer[] {1,2,5})); + parts.add(Arrays.asList(new Integer[] {8,2,5})); + m.setObject("parts", parts); + + Map<String,Object> specs = new HashMap<String,Object>(); + specs.put("colours", colors); + specs.put("dimensions", dimensions); + specs.put("parts", parts); + m.setObject("specs",specs); + + producer.send(m); + </pre></div></div><br class="example-break" /><p>The following table shows the datatypes that can be sent in a <code class="classname">MapMessage</code>, and the corresponding datatypes that will be received by clients in Python or C++.</p><div class="table"><a id="table-Java-Maps"></a><p class="title"><strong>Table 3.2. Java Datatypes in Maps</strong></p><div class="table-contents"><table border="1" summary="Java Datatypes in Maps"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Java Datatype</th><th>Python</th><th>C++</th></tr></thead><tbody><tr><td>boolean</td><td>bool</td><td>bool</td></tr><tr><td>short</td><td>int | long</td><td>int16</td></tr><tr><td>int</td><td>int | long</td><td>int32</td></tr><tr><td>long</td><td>int | long</td><td>int64</td></tr><tr><td>float</td><td>float</td><td>float</td></tr><tr><td>double</td><td>float</td><td>double</td></tr><tr><td>java.lang.String</td><td>unicode</td><td>std::string</td></tr><tr><td>java.util.UUID</td><td>uuid</ td><td>qpid::types::Uuid</td></tr><tr><td>java.util.Map<a class="footnote" href="#ftn.d0e2351" id="d0e2351"><sup class="footnote">[a]</sup></a></td><td>dict</td><td>Variant::Map</td></tr><tr><td>java.util.List</td><td>list</td><td>Variant::List</td></tr></tbody><tbody class="footnotes"><tr><td colspan="3"><div class="footnote" id="ftn.d0e2351"><p><a class="para" href="#d0e2351"><sup class="para">[a] </sup></a>In Qpid, maps can nest. This goes beyond the functionality required by the JMS specification.</p></div></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="JMS-Client-0-10-Miscellaneous.html">Prev</a> </td><td align="center" width="20%"><a accesskey="u" href="JMS-Client-0-10-Miscellaneous.html">Up</a></td><td align="right" width="40%"> </td></tr><tr><td align="left" valign="top" width="40%">Chapter 3. Miscellan eous </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-0-10-Book.html">Home</a></td><td align="right" valign="top" width="40%"> </td></tr></table></div></div> + + <hr/> + + <ul id="-apache-navigation"> + <li><a href="http://www.apache.org/">Apache</a></li> + <li><a href="http://www.apache.org/licenses/">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li> + <li><a href="/security.html">Security</a></li> + <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li> + </ul> + + <p id="-legal"> + Apache Qpid, Messaging built on AMQP; Copyright © 2015 + The Apache Software Foundation; Licensed under + the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache + License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton, + Proton, Apache, the Apache feather logo, and the Apache Qpid + project logo are trademarks of The Apache Software + Foundation; All other marks mentioned may be trademarks or + registered trademarks of their respective owners + </p> + </div> + </div> + </div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/qpid-site/blob/1c801de7/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Miscellaneous.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Miscellaneous.html b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Miscellaneous.html new file mode 100644 index 0000000..8fbce7f --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/JMS-Client-0-10-Miscellaneous.html @@ -0,0 +1,151 @@ +<!DOCTYPE html> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>Chapter 3. Miscellaneous - Apache Qpid™</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <link rel="stylesheet" href="/site.css" type="text/css" async="async"/> + <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/> + <script type="text/javascript">var _deferredFunctions = [];</script> + <script type="text/javascript" src="/deferred.js" defer="defer"></script> + <!--[if lte IE 8]> + <link rel="stylesheet" href="/ie.css" type="text/css"/> + <script type="text/javascript" src="/html5shiv.js"></script> + <![endif]--> + + <!-- Redirects for `go get` and godoc.org --> + <meta name="go-import" + content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/> + <meta name="go-source" + content="qpid.apache.org +https://github.com/apache/qpid-proton/blob/go1/README.md +https://github.com/apache/qpid-proton/tree/go1{/dir} +https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/> + </head> + <body> + <div id="-content"> + <div id="-top" class="panel"> + <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a> + + <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a> + + <ul id="-global-navigation"> + <li><a id="-logotype" href="/index.html">Apache Qpid<sup>™</sup></a></li> + <li><a href="/documentation.html">Documentation</a></li> + <li><a href="/download.html">Download</a></li> + <li><a href="/discussion.html">Discussion</a></li> + </ul> + </div> + + <div id="-menu" class="panel" style="display: none;"> + <div class="flex"> + <section> + <h3>Project</h3> + + <ul> + <li><a href="/overview.html">Overview</a></li> + <li><a href="/components/index.html">Components</a></li> + <li><a href="/releases/index.html">Releases</a></li> + </ul> + </section> + + <section> + <h3>Messaging APIs</h3> + + <ul> + <li><a href="/proton/index.html">Qpid Proton</a></li> + <li><a href="/components/jms/index.html">Qpid JMS</a></li> + <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li> + </ul> + </section> + + <section> + <h3>Servers and tools</h3> + + <ul> + <li><a href="/components/broker-j/index.html">Broker-J</a></li> + <li><a href="/components/cpp-broker/index.html">C++ broker</a></li> + <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li> + </ul> + </section> + + <section> + <h3>Resources</h3> + + <ul> + <li><a href="/dashboard.html">Dashboard</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li> + <li><a href="/resources.html">More resources</a></li> + </ul> + </section> + </div> + </div> + + <div id="-search" class="panel" style="display: none;"> + <form action="http://www.google.com/search" method="get"> + <input type="hidden" name="sitesearch" value="qpid.apache.org"/> + <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/> + <button type="submit">Search</button> + <a href="/search.html">More ways to search</a> + </form> + </div> + + <div id="-middle" class="panel"> + <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/index.html">Qpid JMS AMQP 0-x 6.3.0</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/index.html">Apache Qpid JMS Client for AMQP 0-10</a></li><li>Chapter 3. Miscellaneous</li></ul> + + <div id="-middle-content"> + <div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Chapter 3. Miscellaneous</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-10-Configuring-Logging.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-10-Miscellaneous-MapMessages.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="JMS-Client-0-10-Miscellaneous"></a>Chapter 3. Miscellaneous</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-10-Miscellaneous.html#JMS-Client-0-10-Miscellaneous-Message-Properties">3.1. JMS Message Properties</a></span></dt><dt><span class="section"><a href="JMS-Client-0-10-Miscellaneous-MapMessages.html">3.2. JMS MapMessage T ypes</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="JMS-Client-0-10-Miscellaneous-Message-Properties"></a>3.1. 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 id="d0e2174"></a><p class="title"><strong>Table 3.1. JMS Mapping to AMQP 0-10 Message Properties</strong></p><div class="table-contents"><table border="1" summary="JMS Mapping to AMQP 0-10 Message Properties"><colgroup><col /><col /></colgroup><thead><tr><th>JMS Message Property</th><th>AMQP 0-10 Property<a class="footnote" href="#ftn.d0e2184" id="d0e2184"><sup class="footnote">[a]</sup></a></th></tr></thead><tbody><tr><td>JMSMessageID</td><td>mp.message_id</td></tr><tr><td>qpid.subject<a class="footnote" href="#ftn.d0e2202" id="d0e2202"><sup class="footnote">[b]</sup></a></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<a class="footnote" href="#ftn.d0e2217" id="d0e2217"><sup class="footnote">[c]</sup></a></td></tr><tr><td>JMSCorrelationID</td><td>mp.correlation_id</td></tr><tr><td>JMSDeliveryM ode</td><td>dp.delivery_mode</td></tr><tr><td>JMSPriority</td><td>dp.priority</td></tr><tr><td>JMSExpiration</td><td>dp.ttl<a class="footnote" href="#ftn.d0e2240" id="d0e2240"><sup class="footnote">[d]</sup></a></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" id="ftn.d0e2184"><p><a class="para" href="#d0e2184"><sup class="para">[a] </sup></a>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" id="ftn.d0e2202"><p><a class="para" href="#d0e2202"><sup class="para">[b] </sup></a>This is a custom JMS property, set automatically by the JMS client implementation.</p></div><div class="footnote" id="ftn.d0e2217"><p><a class="para" href="#d0e2217"><sup class ="para">[c] </sup></a>The reply_to is converted from the protocol representation into an address.</p></div><div class="footnote" id="ftn.d0e2240"><p><a class="para" href="#d0e2240"><sup class="para">[d] </sup></a>JMSExpiration = dp.ttl + currentTime</p></div></td></tr></tbody></table></div></div><br class="table-break" /></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-10-Configuring-Logging.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-10-Miscellaneous-MapMessages.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">2.5. Logging </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-0-10-Book.html">Home</a></td><td align="right" valign="top" width="40%"> 3.2. JMS MapMessage Types</td></tr></table></div></div> + + <hr/> + + <ul id="-apache-navigation"> + <li><a href="http://www.apache.org/">Apache</a></li> + <li><a href="http://www.apache.org/licenses/">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li> + <li><a href="/security.html">Security</a></li> + <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li> + </ul> + + <p id="-legal"> + Apache Qpid, Messaging built on AMQP; Copyright © 2015 + The Apache Software Foundation; Licensed under + the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache + License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton, + Proton, Apache, the Apache feather logo, and the Apache Qpid + project logo are trademarks of The Apache Software + Foundation; All other marks mentioned may be trademarks or + registered trademarks of their respective owners + </p> + </div> + </div> + </div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/qpid-site/blob/1c801de7/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/css/style.css ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/css/style.css b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/css/style.css new file mode 100644 index 0000000..8179bf4 --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/css/style.css @@ -0,0 +1,131 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +ul { + list-style-type:square; +} + +th { + font-weight: bold; +} + +.navfooter td { + font-size:10pt; +} + +.navheader td { + font-size:10pt; +} + +body { + margin:0; + background:#FFFFFF; + font-family:"Verdana", sans-serif; + font-size:10pt; +} + +.container { + width:950px; + margin:0 auto; +} + +body a { + color:#000000; +} + + +div.book { + margin-left:10pt; + margin-right:10pt; +} + +div.preface { + margin-left:10pt; + margin-right:10pt; +} + +div.chapter { + margin-left:10pt; + margin-right:10pt; +} + +div.section { + margin-left:10pt; + margin-right:10pt; +} + +div.titlepage { + margin-left:-10pt; + margin-right:-10pt; +} + +.calloutlist td { + font-size:10pt; +} + +.table-contents table { + border-spacing: 0px; +} + +.table-contents td { + font-size:10pt; + padding-left:6px; + padding-right:6px; +} + +.chapter h2.title { + font-size:20pt; + color:#0c3b82; +} + +.chapter .section h2.title { + font-size:18pt; + color:#0c3b82; +} + +.section h2.title { + font-size:16pt; + color:#0c3b82; +} + +.section h3.title { + font-size:14pt; + color:#0c3b82; +} + +.section h4.title { + font-size:12pt; + color:#0c3b82; +} + +.section h5.title { + font-size:12pt; + color:#0c3b82; +} + +.section h6.title { + font-size:12pt; + color:#0c3b82; +} + +.toc a { + font-size:9pt; +} + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/1c801de7/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/index.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/index.html b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/index.html new file mode 100644 index 0000000..0b2409a --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-10-book/index.html @@ -0,0 +1,144 @@ +<!DOCTYPE html> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>Apache Qpid JMS Client for AMQP 0-10 - Apache Qpid™</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <link rel="stylesheet" href="/site.css" type="text/css" async="async"/> + <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/> + <script type="text/javascript">var _deferredFunctions = [];</script> + <script type="text/javascript" src="/deferred.js" defer="defer"></script> + <!--[if lte IE 8]> + <link rel="stylesheet" href="/ie.css" type="text/css"/> + <script type="text/javascript" src="/html5shiv.js"></script> + <![endif]--> + + <!-- Redirects for `go get` and godoc.org --> + <meta name="go-import" + content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/> + <meta name="go-source" + content="qpid.apache.org +https://github.com/apache/qpid-proton/blob/go1/README.md +https://github.com/apache/qpid-proton/tree/go1{/dir} +https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/> + </head> + <body> + <div id="-content"> + <div id="-top" class="panel"> + <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a> + + <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a> + + <ul id="-global-navigation"> + <li><a id="-logotype" href="/index.html">Apache Qpid<sup>™</sup></a></li> + <li><a href="/documentation.html">Documentation</a></li> + <li><a href="/download.html">Download</a></li> + <li><a href="/discussion.html">Discussion</a></li> + </ul> + </div> + + <div id="-menu" class="panel" style="display: none;"> + <div class="flex"> + <section> + <h3>Project</h3> + + <ul> + <li><a href="/overview.html">Overview</a></li> + <li><a href="/components/index.html">Components</a></li> + <li><a href="/releases/index.html">Releases</a></li> + </ul> + </section> + + <section> + <h3>Messaging APIs</h3> + + <ul> + <li><a href="/proton/index.html">Qpid Proton</a></li> + <li><a href="/components/jms/index.html">Qpid JMS</a></li> + <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li> + </ul> + </section> + + <section> + <h3>Servers and tools</h3> + + <ul> + <li><a href="/components/broker-j/index.html">Broker-J</a></li> + <li><a href="/components/cpp-broker/index.html">C++ broker</a></li> + <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li> + </ul> + </section> + + <section> + <h3>Resources</h3> + + <ul> + <li><a href="/dashboard.html">Dashboard</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li> + <li><a href="/resources.html">More resources</a></li> + </ul> + </section> + </div> + </div> + + <div id="-search" class="panel" style="display: none;"> + <form action="http://www.google.com/search" method="get"> + <input type="hidden" name="sitesearch" value="qpid.apache.org"/> + <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/> + <button type="submit">Search</button> + <a href="/search.html">More ways to search</a> + </form> + </div> + + <div id="-middle" class="panel"> + <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/index.html">Qpid JMS AMQP 0-x 6.3.0</a></li><li>Apache Qpid JMS Client for AMQP 0-10</li></ul> + + <div id="-middle-content"> + <div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Apache Qpid JMS Client for AMQP 0-10</th></tr><tr><td align="left" width="20%"> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-10-Example.html">Next</a></td></tr></table><hr /></div><div class="book"><div class="titlepage"><div><div><h1 class="title"><a id="d0e2"></a>Apache Qpid JMS Client for AMQP 0-10</h1></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="chapter"><a href="JMS-Client-0-10-Example.html">1. HelloWorld Example</a></span></dt><dt><span class="chapter"><a href="JMS-Client-0-10-Configuring.html">2. Configuring the Client</a></span></dt><dd><dl><dt><span class="section"><a href="JMS-Client-0-10-Configuring.html#JMS-Client-0-10-Configuring-Overview">2.1. Overview</a></span></dt><dt><span class="sect ion"><a href="JMS-Client-0-10-Configuring-JNDI.html">2.2. JNDI Properties</a></span></dt><dd><dl><dt><span class="section"><a href="JMS-Client-0-10-Configuring-JNDI.html#d0e159">2.2.1. Properties File Format</a></span></dt><dt><span class="section"><a href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL">2.2.2. Connection URLs</a></span></dt></dl></dd><dt><span class="section"><a href="JMS-Client-0-10-Configuring-JVM-Properties.html">2.3. JVM Properties</a></span></dt><dt><span class="section"><a href="JMS-Client-0-10-Configuring-Addresses.html">2.4. Addresses</a></span></dt><dd><dl><dt><span class="section"><a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1449">2.4.1. Address Strings</a></span></dt><dt><span class="section"><a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1473">2.4.2. Subjects</a></span></dt><dt><span class="section"><a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1649">2.4.3. Address String Options</a></spa n></dt><dt><span class="section"><a href="JMS-Client-0-10-Configuring-Addresses.html#section-address-string-bnf">2.4.4. Address String Grammar</a></span></dt></dl></dd><dt><span class="section"><a href="JMS-Client-0-10-Configuring-Logging.html">2.5. Logging</a></span></dt></dl></dd><dt><span class="chapter"><a href="JMS-Client-0-10-Miscellaneous.html">3. Miscellaneous</a></span></dt><dd><dl><dt><span class="section"><a href="JMS-Client-0-10-Miscellaneous.html#JMS-Client-0-10-Miscellaneous-Message-Properties">3.1. JMS Message Properties</a></span></dt><dt><span class="section"><a href="JMS-Client-0-10-Miscellaneous-MapMessages.html">3.2. JMS MapMessage Types</a></span></dt></dl></dd></dl></div><div class="list-of-tables"><p><strong>List of Tables</strong></p><dl><dt>2.1. <a href="JMS-Client-0-10-Configuring-JNDI.html#d0e171">JNDI Properties syntax</a></dt><dt>2.2. <a href="JMS-Client-0-10-Configuring-JNDI.html#d0e234">Connection URL Properties</a></dt><dt>2.3. <a href="JMS-Client-0-1 0-Configuring-JNDI.html#d0e417">Broker List Options</a></dt><dt>2.4. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e585">Config Options For Connection Behaviour</a></dt><dt>2.5. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e647">Config Options For Session Behaviour</a></dt><dt>2.6. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e705">Config Options For Consumer Behaviour</a></dt><dt>2.7. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e812">Config Options For Producer Behaviour</a></dt><dt>2.8. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e842">Config Options For Threading</a></dt><dt>2.9. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e882">Config Options For I/O</a></dt><dt>2.10. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e1002">Config Options For Security</a></dt><dt>2.11. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e1076">Config Options For Security - Standard JVM propertie s needed when using GSSAPI as the SASL mechanism.</a></dt><dt>2.12. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e1121">Config Options For Security - Using SSL for securing connections or using EXTERNAL as the SASL mechanism.</a></dt><dt>2.13. <a href="JMS-Client-0-10-Configuring-JVM-Properties.html#d0e1186">Config Options For Security - Standard JVM properties needed when Using SSL for securing connections or using EXTERNAL as the SASL mechanism.</a></dt><dt>2.14. <a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1864">Address String Options</a></dt><dt>2.15. <a href="JMS-Client-0-10-Configuring-Addresses.html#table-node-properties">Node Properties</a></dt><dt>2.16. <a href="JMS-Client-0-10-Configuring-Addresses.html#table-link-properties">Link Properties</a></dt><dt>3.1. <a href="JMS-Client-0-10-Miscellaneous.html#d0e2174">JMS Mapping to AMQP 0-10 Message Properties</a></dt><dt>3.2. <a href="JMS-Client-0-10-Miscellaneous-MapMessages.html#table-Java-Maps">Java Da tatypes in Maps</a></dt></dl></div><div class="list-of-examples"><p><strong>List of Examples</strong></p><dl><dt>1.1. <a href="JMS-Client-0-10-Example.html#d0e12">"Hello world!" in Java</a></dt><dt>1.2. <a href="JMS-Client-0-10-Example.html#d0e80">JNDI Properties File for "Hello world!" example</a></dt><dt>2.1. <a href="JMS-Client-0-10-Configuring-JNDI.html#d0e164">JNDI Properties File</a></dt><dt>2.2. <a href="JMS-Client-0-10-Configuring-JNDI.html#d0e400">Broker Lists</a></dt><dt>2.3. <a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1346">Queues</a></dt><dt>2.4. <a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1380">Topics</a></dt><dt>2.5. <a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1487">Using subjects</a></dt><dt>2.6. <a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1584">Subjects with multi-word keys</a></dt><dt>2.7. <a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1706">Assertions on Nodes</a></dt><dt>2.8. <a href="JMS-Client-0-10-Configuring- Addresses.html#d0e1742">Creating a Queue Automatically</a></dt><dt>2.9. <a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1776">Browsing a Queue</a></dt><dt>2.10. <a href="JMS-Client-0-10-Configuring-Addresses.html#d0e1824">Using the XML Exchange</a></dt><dt>2.11. <a href="JMS-Client-0-10-Configuring-Logging.html#d0e2144">log4j Logging Properties</a></dt><dt>3.1. <a href="JMS-Client-0-10-Miscellaneous-MapMessages.html#d0e2269">Sending a JMS MapMessage</a></dt></dl></div></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-10-Example.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%"> </td><td align="center" width="20%"> </td><td align="right" valign="top" width="40%"> Chapter 1. HelloWorld Example</td></tr></table></div></div> + + <hr/> + + <ul id="-apache-navigation"> + <li><a href="http://www.apache.org/">Apache</a></li> + <li><a href="http://www.apache.org/licenses/">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li> + <li><a href="/security.html">Security</a></li> + <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li> + </ul> + + <p id="-legal"> + Apache Qpid, Messaging built on AMQP; Copyright © 2015 + The Apache Software Foundation; Licensed under + the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache + License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton, + Proton, Apache, the Apache feather logo, and the Apache Qpid + project logo are trademarks of The Apache Software + Foundation; All other marks mentioned may be trademarks or + registered trademarks of their respective owners + </p> + </div> + </div> + </div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/qpid-site/blob/1c801de7/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Exceptions.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Exceptions.html b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Exceptions.html new file mode 100644 index 0000000..eab26a5 --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Exceptions.html @@ -0,0 +1,197 @@ +<!DOCTYPE html> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>Appendix A. Exceptions - Apache Qpid™</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <link rel="stylesheet" href="/site.css" type="text/css" async="async"/> + <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/> + <script type="text/javascript">var _deferredFunctions = [];</script> + <script type="text/javascript" src="/deferred.js" defer="defer"></script> + <!--[if lte IE 8]> + <link rel="stylesheet" href="/ie.css" type="text/css"/> + <script type="text/javascript" src="/html5shiv.js"></script> + <![endif]--> + + <!-- Redirects for `go get` and godoc.org --> + <meta name="go-import" + content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/> + <meta name="go-source" + content="qpid.apache.org +https://github.com/apache/qpid-proton/blob/go1/README.md +https://github.com/apache/qpid-proton/tree/go1{/dir} +https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/> + </head> + <body> + <div id="-content"> + <div id="-top" class="panel"> + <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a> + + <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a> + + <ul id="-global-navigation"> + <li><a id="-logotype" href="/index.html">Apache Qpid<sup>™</sup></a></li> + <li><a href="/documentation.html">Documentation</a></li> + <li><a href="/download.html">Download</a></li> + <li><a href="/discussion.html">Discussion</a></li> + </ul> + </div> + + <div id="-menu" class="panel" style="display: none;"> + <div class="flex"> + <section> + <h3>Project</h3> + + <ul> + <li><a href="/overview.html">Overview</a></li> + <li><a href="/components/index.html">Components</a></li> + <li><a href="/releases/index.html">Releases</a></li> + </ul> + </section> + + <section> + <h3>Messaging APIs</h3> + + <ul> + <li><a href="/proton/index.html">Qpid Proton</a></li> + <li><a href="/components/jms/index.html">Qpid JMS</a></li> + <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li> + </ul> + </section> + + <section> + <h3>Servers and tools</h3> + + <ul> + <li><a href="/components/broker-j/index.html">Broker-J</a></li> + <li><a href="/components/cpp-broker/index.html">C++ broker</a></li> + <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li> + </ul> + </section> + + <section> + <h3>Resources</h3> + + <ul> + <li><a href="/dashboard.html">Dashboard</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li> + <li><a href="/resources.html">More resources</a></li> + </ul> + </section> + </div> + </div> + + <div id="-search" class="panel" style="display: none;"> + <form action="http://www.google.com/search" method="get"> + <input type="hidden" name="sitesearch" value="qpid.apache.org"/> + <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/> + <button type="submit">Search</button> + <a href="/search.html">More ways to search</a> + </form> + </div> + + <div id="-middle" class="panel"> + <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/index.html">Qpid JMS AMQP 0-x 6.3.0</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/index.html">Apache Qpid JMS AMQP 0-8/0-9/0-9-1</a></li><li>Appendix A. Exceptions</li></ul> + + <div id="-middle-content"> + <div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Appendix A. Exceptions</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Logging-EnablingDebugLogging.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-Maven.html">Next</a></td></tr></table><hr /></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="JMS-Client-0-8-Appendix-Exceptions"></a>Appendix A. Exceptions</h1></div></div></div><p>The methods of the Client throw <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/JMSException.html" target="_top">JMSExceptions</a> in response to error + conditions. Typically the exception's message (#getMessage()) summarises the error condition, + with contextual information being provided by the messages of linked exception(s). To understand + the problem, it is important to read the messages associated with <span class="emphasis"><em>all</em></span> the + linked exceptions.</p><p>The following table describes some of the more common exceptions linked to JMSException + thrown by JMS methods whilst using the client:</p><div class="table"><a id="d0e3006"></a><p class="title"><strong>Table A.1. Exceptions linked to JMSExceptions thrown by JMS methods</strong></p><div class="table-contents"><table border="1" summary="Exceptions linked to JMSExceptions thrown by JMS methods" width="100%"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Linked Exception</th><th>Message</th><th>Explanation/Common Causes</th></tr></thead><tbody><tr><td>AMQUnresolvedAddressException</td><td><span class="emphasis"><em>message varies</em></span></td><td><p>Indicates that the hostname included in the Connection URL's <a class="link" href="JMS-Client-0-8-Connection-URL.html#JMS-Client-0-8-Connection-URL-ConnectionOptions-Brokerlist">brokerlist</a>, could not be resolved, . This could mean that the hostname is + mispelt, or there is name resolution problem.</p></td></tr><tr><td>AMQConnectionFailure</td><td>Connection refused</td><td><p>Indicates that the host included in the Connection URL's <a class="link" href="JMS-Client-0-8-Connection-URL.html#JMS-Client-0-8-Connection-URL-ConnectionOptions-Brokerlist">brokerlist</a>, actively refused the connection. This could mean that the + hostname and/or port number is incorrect, or the Broker may not be + running.</p></td></tr><tr><td>AMQConnectionFailure</td><td>connect timed out</td><td><p>Indicates that the host included in the Connection URL's <a class="link" href="JMS-Client-0-8-Connection-URL.html#JMS-Client-0-8-Connection-URL-ConnectionOptions-Brokerlist">brokerlist</a>, could not be contacted within the <a class="link" href="JMS-Client-0-8-Connection-URL.html#JMS-Client-0-8-Connection-URL-BrokerOptions-ConnectTimeout">connecttimeout</a>. This could mean that the host is shutdown, or a networking + routing problem means the host is unreachable.</p></td></tr><tr><td>AMQConnectionFailure</td><td>General SSL Problem; PKIX path building failed; unable to find valid certification + path to requested target</td><td><p>Indicates that the CA that signed the Broker's certificate is not trusted by + the JVM of the client. If the Broker is using a private-CA (or a self signed + certificate) check that the client has been properly configured with a truststore. See + <a class="xref" href="JMS-Client-0-8-Client-Understanding-Connection.html#JMS-Client-0-8-Client-Understanding-Connection-SSL" title="5.3.3. SSL">Section 5.3.3, “SSL”</a></p></td></tr><tr><td>AMQConnectionFailure / AMQAuthenticationException</td><td>not allowed</td><td><p>Indicates that the user cannot be authenticated by the Broker. Check the + username and/or password elements within the <a class="link" href="JMS-Client-0-8-Connection-URL.html" title="Chapter 7. Connection URLs">Connection URL</a>.</p></td></tr><tr><td>AMQConnectionFailure / AMQSecurityException</td><td>Permission denied: <span class="emphasis"><em>virtualhost name</em></span>; access refused</td><td><p>Indicates that the user is not authorised to connect to the given + virtualhost. The user is recognised by the Broker and is using the correct password + but does not have permission. This exception normally indicates that the user (or + group) has not been permissioned within the Broker's <a class="link" href="../../java-broker/book/Java-Broker-Security-ACLs.html" target="_top">Access Control List + (ACL)</a>.</p></td></tr><tr><td>AMQTimeoutException</td><td>The server's response was not received within the time-out period of %d ms.</td><td> + <p>Indicates that the Broker's response to the request sent by the client was not received + within a timely fashion. The timeout is governed by + <a class="link" href="JMS-Client-0-8-System-Properties.html#JMS-Client-0-8-System-Properties-SyncOpTimeout"> + <code class="literal">qpid.sync_op_timeout</code> + </a>. + </p> + <p>This can be a symptom of a heavily loaded Broker, an overloaded network or a client JVM itself which + is too overloaded to process incoming responses. Check for unreasonably long garbage collection pauses. + </p> + </td></tr><tr><td>AMQSecurityException</td><td>Permission denied: <span class="emphasis"><em>message varies</em></span></td><td><p>Indicates that the user is not authorised to use the given resource or + perform the given operation. This exception normally indicates that the user (or + group) has not been permissioned within the Broker's <a class="link" href="../../java-broker/book/Java-Broker-Security-ACLs.html" target="_top">Access Control List + (ACL)</a>.</p></td></tr><tr><td><a id="JMS-Client-0-8-Appendix-Exceptions-CertificateException"></a>CertificateException</td><td>Unable to find certificate for recipient '<recipient>'</td><td> + <p>When using end to end message encryption, this exception indicates the the message recipent's + principal cannot be found in the truststore. See <a class="xref" href="JMS-Client-Message-Encryption.html" title="Chapter 9. Message Encryption">Chapter 9, <em>Message Encryption</em></a> + </p> + </td></tr></tbody></table></div></div><br class="table-break" /><p>The following table describes some of the more common exceptions linked to JMSException sent + to <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/ExceptionListener.html" target="_top">ExceptionListener</a> + instances.</p><div class="table"><a id="d0e3139"></a><p class="title"><strong>Table A.2. Exceptions linked to JMSExceptions received by ExceptionListeners</strong></p><div class="table-contents"><table border="1" summary="Exceptions linked to JMSExceptions received by ExceptionListeners" width="100%"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Linked Exception</th><th>Message</th><th>Explanation/Common Causes</th></tr></thead><tbody><tr><td><a id="JMS-Client-0-8-Appendix-Exceptions-AMQNoRouteException"></a>AMQNoRouteException</td><td>No Route for message [Exchange: <span class="emphasis"><em>exchange name</em></span>, Routing key: + <span class="emphasis"><em>routing key</em></span>] [error code 312: no route]</td><td><p>Indicate that the named exchange is unable to route a message to at least one + queue.</p> + <p>This will occur if a queue has been improperly bound to an exchange. Use the + Broker's management interface to check the bindings. See <a class="xref" href="JMS-Client-0-8-Client-Understanding-MessageProducer.html#JMS-Client-0-8-Client-Understanding-MessageProducer-MandatoryMessage" title="5.5.1. Mandatory Messages">Section 5.5.1, “Mandatory Messages”</a></p></td></tr><tr><td><a id="JMS-Client-0-8-Appendix-Exceptions-AMQNoConsumersException"></a>AMQNoConsumersException</td><td>Immediate delivery is not possible. [error code 313: no consumers]</td><td><p>Immediate delivery was requested by the MessageProducer, but as there are no + consumers on any target queue, the message has been returned to the publisher. See + <a class="xref" href="JMS-Client-0-8-Client-Understanding-MessageProducer.html#JMS-Client-0-8-Client-Understanding-MessageProducer-ImmediateMessage" title="5.5.3. Immediate Messages">Section 5.5.3, “Immediate Messages”</a> + </p></td></tr><tr><td>AMQDisconnectedException</td><td>Server closed connection and reconnection not permitted</td><td><p>Indicates that the connection was closed by the Broker, and as <a class="link" href="JMS-Client-0-8-Client-Understanding-Connection.html#JMS-Client-0-8-Client-Understanding-Connection-Failover" title="5.3.1. Failover">failover + options</a> are not included in the Connection URL, the client has been unable to + reestablish connection.</p> + <p>The Connection is now closed and any attempt to use either Connection object, or + any objects created from the Connection will receive an <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/IllegalStateException.html" target="_top">IllegalStateException</a>.</p></td></tr><tr><td><a id="JMS-Client-0-8-Appendix-Exceptions-AMQDisconnectedException"></a>AMQDisconnectedException</td><td>Server closed connection and no failover was successful</td><td><p>Indicates that the connection was closed by the Broker. The client has tried + failover according to the rules of the <a class="link" href="JMS-Client-0-8-Client-Understanding-Connection.html#JMS-Client-0-8-Client-Understanding-Connection-Failover" title="5.3.1. Failover">failover + options</a>within the Connection URL, but these attempts were all + unsuccessful.</p> + <p>The Connection is now closed and any attempt to use either Connection object, or + any objects created from the Connection will receive an <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/IllegalStateException.html" target="_top">IllegalStateException</a>.</p></td></tr></tbody></table></div></div><br class="table-break" /></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-Logging-EnablingDebugLogging.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-Maven.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">11.2. Enabling Debug </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-Book.html">Home</a></td><td align="right" valign="top" width="40%"> Appendix B. Minimal Maven POM</td></tr></table></div></div> + + <hr/> + + <ul id="-apache-navigation"> + <li><a href="http://www.apache.org/">Apache</a></li> + <li><a href="http://www.apache.org/licenses/">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li> + <li><a href="/security.html">Security</a></li> + <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li> + </ul> + + <p id="-legal"> + Apache Qpid, Messaging built on AMQP; Copyright © 2015 + The Apache Software Foundation; Licensed under + the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache + License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton, + Proton, Apache, the Apache feather logo, and the Apache Qpid + project logo are trademarks of The Apache Software + Foundation; All other marks mentioned may be trademarks or + registered trademarks of their respective owners + </p> + </div> + </div> + </div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/qpid-site/blob/1c801de7/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html new file mode 100644 index 0000000..1525b72 --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html @@ -0,0 +1,163 @@ +<!DOCTYPE html> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>C.2. Binding Management - Apache Qpid™</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <link rel="stylesheet" href="/site.css" type="text/css" async="async"/> + <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/> + <script type="text/javascript">var _deferredFunctions = [];</script> + <script type="text/javascript" src="/deferred.js" defer="defer"></script> + <!--[if lte IE 8]> + <link rel="stylesheet" href="/ie.css" type="text/css"/> + <script type="text/javascript" src="/html5shiv.js"></script> + <![endif]--> + + <!-- Redirects for `go get` and godoc.org --> + <meta name="go-import" + content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/> + <meta name="go-source" + content="qpid.apache.org +https://github.com/apache/qpid-proton/blob/go1/README.md +https://github.com/apache/qpid-proton/tree/go1{/dir} +https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/> + </head> + <body> + <div id="-content"> + <div id="-top" class="panel"> + <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a> + + <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a> + + <ul id="-global-navigation"> + <li><a id="-logotype" href="/index.html">Apache Qpid<sup>™</sup></a></li> + <li><a href="/documentation.html">Documentation</a></li> + <li><a href="/download.html">Download</a></li> + <li><a href="/discussion.html">Discussion</a></li> + </ul> + </div> + + <div id="-menu" class="panel" style="display: none;"> + <div class="flex"> + <section> + <h3>Project</h3> + + <ul> + <li><a href="/overview.html">Overview</a></li> + <li><a href="/components/index.html">Components</a></li> + <li><a href="/releases/index.html">Releases</a></li> + </ul> + </section> + + <section> + <h3>Messaging APIs</h3> + + <ul> + <li><a href="/proton/index.html">Qpid Proton</a></li> + <li><a href="/components/jms/index.html">Qpid JMS</a></li> + <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li> + </ul> + </section> + + <section> + <h3>Servers and tools</h3> + + <ul> + <li><a href="/components/broker-j/index.html">Broker-J</a></li> + <li><a href="/components/cpp-broker/index.html">C++ broker</a></li> + <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li> + </ul> + </section> + + <section> + <h3>Resources</h3> + + <ul> + <li><a href="/dashboard.html">Dashboard</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li> + <li><a href="/resources.html">More resources</a></li> + </ul> + </section> + </div> + </div> + + <div id="-search" class="panel" style="display: none;"> + <form action="http://www.google.com/search" method="get"> + <input type="hidden" name="sitesearch" value="qpid.apache.org"/> + <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/> + <button type="submit">Search</button> + <a href="/search.html">More ways to search</a> + </form> + </div> + + <div id="-middle" class="panel"> + <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/index.html">Qpid JMS AMQP 0-x 6.3.0</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.0/jms-amqp-0-8-book/index.html">Apache Qpid JMS AMQP 0-8/0-9/0-9-1</a></li><li>C.2. Binding Management</li></ul> + + <div id="-middle-content"> + <div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">C.2. Binding Management</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Appendix-JMS-Extensions.html">Prev</a> </td><th align="center" width="60%">Appendix C. JMS Extensions</th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-PooledConnecytionFactory.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="JMS-Client-0-8-Appendix-JMS-Extensions-Binding"></a>C.2. Binding Management</h2></div></div></div><p>These extensions allow bindings to be created or removed.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="JMS-Client-0-8-Appendix-JMS-Extensions-Binding-Creation"></a>C.2.1. Binding creation</h3></div></div></div><p>The following exam ple illustrates the creation of queue binding to topic exchange with + JMS client.</p><div class="example"><a id="d0e3266"></a><p class="title"><strong>Example C.2. Binding a queue using JMS</strong></p><div class="example-contents"><pre class="programlisting">ConnectionFactory connectionFactory = ... +Connection connection = connectionFactory.createConnection(); +AMQSession<?, ?> session = (AMQSession<?,?>)connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + +... + +AMQShortString queueName = new AMQShortString("testQueue"); +AMQShortString routingKey = new AMQShortString("testRoutingKey"); +AMQDestination destination = (AMQDestination) session.createQueue(queueName.asString()); + +... + +// binding arguments +Map<String, Object> arguments = new HashMap<String, Object>(); +arguments.put("x-filter-jms-selector", "application='app1'"); + +// create binding +session.bindQueue(queueName, routingKey, FieldTable.convertToFieldTable(arguments), + new AMQShortString("amq.topic"), destination);</pre></div></div><br class="example-break" /></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-Appendix-JMS-Extensions.html">Prev</a> </td><td align="center" width="20%"><a accesskey="u" href="JMS-Client-0-8-Appendix-JMS-Extensions.html">Up</a></td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-PooledConnecytionFactory.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">Appendix C. JMS Extensions </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-Book.html">Home</a></td><td align="right" valign="top" width="40%"> Appendix D. PooledConnectionFactory</td></tr></table></div></div> + + <hr/> + + <ul id="-apache-navigation"> + <li><a href="http://www.apache.org/">Apache</a></li> + <li><a href="http://www.apache.org/licenses/">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li> + <li><a href="/security.html">Security</a></li> + <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li> + </ul> + + <p id="-legal"> + Apache Qpid, Messaging built on AMQP; Copyright © 2015 + The Apache Software Foundation; Licensed under + the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache + License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton, + Proton, Apache, the Apache feather logo, and the Apache Qpid + project logo are trademarks of The Apache Software + Foundation; All other marks mentioned may be trademarks or + registered trademarks of their respective owners + </p> + </div> + </div> + </div> + </body> +</html> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org