http://git-wip-us.apache.org/repos/asf/qpid-site/blob/b3a90a4a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-JMS-Extensions.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-JMS-Extensions.html b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-JMS-Extensions.html new file mode 100644 index 0000000..b329fbf --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-JMS-Extensions.html @@ -0,0 +1,158 @@ +<!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 C. JMS Extensions - 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.2/index.html">Qpid JMS AMQP 0-x 6.3.2</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/index.html">Apache Qpid JMS AMQP 0-8/0-9/0-9-1</a></li><li>Appendix C. JMS Extensions</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 C. JMS Extensions</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Appendix-Maven.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-JMS-Extensions-Binding.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-JMS-Extensions"></a>Appendix C. JMS Extensions</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="JMS-Client-0-8-Appendix-JMS-Extensions.html#JMS-Client-0-8-Appendix-JMS-Extensions-Queue">C.1. Queue Management</a></span></dt><dd><dl><dt><span class="section"><a href="JMS-Client-0-8-Appendix-JMS-Extensions.html#JMS-C lient-0-8-Appendix-JMS-Extensions-Queue-Creation">C.1.1. Queue creation</a></span></dt></dl></dd><dt><span class="section"><a href="JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html">C.2. Binding Management</a></span></dt><dd><dl><dt><span class="section"><a href="JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html#JMS-Client-0-8-Appendix-JMS-Extensions-Binding-Creation">C.2.1. Binding creation</a></span></dt></dl></dd></dl></div><p>This section illustrates using Qpid specific extentions to JMS for the managament of queues, + exchanges and bindings.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>It is not recommended that these extensions are generally used. These interfaces are + subject to change and will not be supported in this form for AMQP 1.0. Instead, the reader is + directed towards the Managment interfaces of the Broker.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="JMS-Client-0-8-Appendix-JMS-Extensions-Queue"></a>C.1. Queue Management</h2></div></div></div><p>These extensions allow queues 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-Queue-Creation"></a>C.1.1. Queue creation</h3></div></div></div><p>The following example illustrates the creation of the a LVQ queue from a + javax.jms.Session object. Note that this utilises a Qpid specific extension to JMS and + involves casting the session object back to its Qpid base-class.</p><div class="example"><a id="d0e3251"></a><p class="title"><strong>Example C.1. Creation of an LVQ using the Qpid extension to JMS</strong></p><div class="example-contents"><pre class="programlisting">Map<String,Object> arguments = new HashMap<String, Object>(); +arguments.put("qpid.last_value_queue_key","ISIN"); +AMQDestination amqQueue = (AMQDestination) context.lookup("myqueue"); +((AMQSession<?,?>) session).createQueue( + AMQShortString.valueOf(amqQueue.getQueueName()), + amqQueue.isAutoDelete(), + amqQueue.isDurable(), + amqQueue.isExclusive(), + arguments); +</pre></div></div><br class="example-break" /></div></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-Maven.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">Appendix B. Minimal Maven POM </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-Book.html">Home</a></td><td align="right" valign="top" width="40%"> C.2. Binding Management</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/b3a90a4a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Maven.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Maven.html b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Maven.html new file mode 100644 index 0000000..fba61ea --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Maven.html @@ -0,0 +1,175 @@ +<!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 B. Minimal Maven POM - 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.2/index.html">Qpid JMS AMQP 0-x 6.3.2</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/index.html">Apache Qpid JMS AMQP 0-8/0-9/0-9-1</a></li><li>Appendix B. Minimal Maven POM</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 B. Minimal Maven POM</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Appendix-Exceptions.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-JMS-Extensions.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-Maven"></a>Appendix B. Minimal Maven POM</h1></div></div></div><p> The following is a minimal Maven POM required to use the Qpid Client. It is suitable for + use with the <a class="link" href="JMS-Client-0-8-Examples.html" title="Chapter 4. Examples">examples</a> included in this + book.</p><div class="example"><a id="d0e3224"></a><p class="title"><strong>Example B.1. Minimal Maven POM </strong></p><div class="example-contents"><pre class="programlisting"> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>test</groupId> + <artifactId>test</artifactId> + <version>0.0.1-SNAPSHOT</version> + <dependencies> + <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-client</artifactId> + <version>6.3.2</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.6.4</version> + </dependency> + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-jms_1.1_spec</artifactId> + <version>1.1.1</version> + </dependency> + </dependencies> +</project> + + </pre></div></div><br class="example-break" /><p>Note: We use the SLF4J Binding for Log4J12 here, but any SLF4J Binding could be used + instead. Similarly, Geronimo JMS Spec is used, but any dependency that provides the JMS 1.1 + specification could be substituted.</p></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-Exceptions.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-JMS-Extensions.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">Appendix A. Exceptions </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 C. JMS Extensions</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/b3a90a4a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-PooledConnecytionFactory.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-PooledConnecytionFactory.html b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-PooledConnecytionFactory.html new file mode 100644 index 0000000..1a7f030 --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-PooledConnecytionFactory.html @@ -0,0 +1,195 @@ +<!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 D. PooledConnectionFactory - 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.2/index.html">Qpid JMS AMQP 0-x 6.3.2</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/index.html">Apache Qpid JMS AMQP 0-8/0-9/0-9-1</a></li><li>Appendix D. PooledConnectionFactory</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 D. PooledConnectionFactory</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.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-PooledConnecytionFactory"></a>Appendix D. PooledConnectionFactory</h1></div></div></div><p>Qpid client provides <code class="literal">PooledConnectionFactory</code> which is a special + implementation of <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/ConnectionFactory.html" target="_top">ConnectionFactory</a> supporting <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/Connection.html" target="_top">Connection</a> pooling. </p><p> The <code class="literal">PooledConnectionFactory</code> caches a predefined number of connections + thus saving an application which connects frequently time. The <code class="literal">Connection</code> + instance is taken from the pool whenever method + <code class="literal">PooledConnectionFactory#createConnection()</code> is invoked and returned into the + pool when method <code class="literal">Connection#close()</code> is called.</p><p>A user can configure a maximum allowed number of connections to remain in pool (10 by + default) by calling <code class="literal">PooledConnectionFactory#setMaxPoolSize(int)</code>. When number + of connections exceeds the value set for maximum pool size, + <code class="literal">PooledConnectionFactory</code> starts to work as a normal <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/ConnectionFactory.html" target="_top">ConnectionFactory</a> and creates + a new connection every time method <code class="literal">PooledConnectionFactory#createConnection()</code> + is invoked.</p><p>The <a class="link" href="JMS-Client-0-8-Connection-URL.html" title="Chapter 7. Connection URLs">Connection URL</a> is set by invoking + method <code class="literal">PooledConnectionFactory#setConnectionURLString(String)</code>.</p><p>A user can specify the maximum time a connection may remain idle in pool by calling + <code class="literal">PooledConnectionFactory#setConnectionTimeout(long)</code> passing a value in + milliseconds. If connection is not used within the specified interval it is closed + automatically. </p><p>This implementation can be useful in <span class="emphasis"><em>Spring JMS</em></span> based applications. An + example below demonstrates how to configure <code class="literal">PooledConnectionFactory</code> in the + Spring xml configuration. </p><div class="example"><a id="d0e3335"></a><p class="title"><strong>Example D.1. Example of configuring <span class="emphasis"><em>PooledConnectionFactory</em></span> in spring xml + configuration.</strong></p><div class="example-contents"><pre class="programlisting"> +<bean id="pooledConnectionFactory" class="org.apache.qpid.client.PooledConnectionFactory"> + <!-- set maximum number of pool connections to 20--> + <property name="maxPoolSize" value="20"></property> + <!-- set the timeout for connection to remain open in pool without being used --> + <property name="connectionTimeout" value="60000"></property> + <!-- set connection URL as String --> + <property name="connectionURLString" value="amqp://guest:guest@clientid/default?brokerlist='tcp://localhost:5672?retries='300'&failover='nofailover''&maxprefetch='0'"></property> +</bean></pre></div></div><p><br class="example-break" /> + </p><p> + <span class="emphasis"><em>PooledConnectionFactory</em></span> spring bean can be configured with such + <span class="emphasis"><em>spring-jms</em></span> beans like + <span class="emphasis"><em>DefaultMessageListenerContainer</em></span> and <span class="emphasis"><em>JmsTemplate</em></span>. The + example below demonstrates how to do that </p><div class="example"><a id="d0e3358"></a><p class="title"><strong>Example D.2. Examples of configuring <span class="emphasis"><em>PooledConnectionFactory</em></span> with + <span class="emphasis"><em>DefaultMessageListenerContainer</em></span> and + <span class="emphasis"><em>JmsTemplate</em></span>.</strong></p><div class="example-contents"><pre class="programlisting"> +<bean id="jmsProducerTemplate" class="org.springframework.jms.core.JmsTemplate"> + <!-- set reference to pooledConnectionFactory bean --> + <property name="connectionFactory" ref="pooledConnectionFactory"></property> + <property name="defaultDestination" ref="destination" /> +</bean> + +<bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> + <!-- set reference to pooledConnectionFactory bean --> + <property name="connectionFactory" ref="pooledConnectionFactory"/> + <property name="destination" ref="destination"/> + <property name="messageListener" ref="messageListener" /> +</bean></pre></div></div><p><br class="example-break" /> + </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>If using <code class="literal">DefaultMessageListenerContainer</code> with + <code class="literal">cacheLevel</code> set to <code class="literal">NONE</code> it is important that + <code class="literal">maxConcurrentConsumer</code> does not exceed the value of maximum pool size set + on <code class="literal">PooledConnectionFactory</code> bean. If this is not the case, once the number + of in-use connections reaches the the <span class="emphasis"><em>PooledConnectionFactory#maxPoolSize</em></span> + a new connection will be opened for each and every message receipt i.e. a connection per + message anti-pattern.</p></div></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="JMS-Client-0-8-Appendix-JMS-Extensions-Binding.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">C.2. Binding Management </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 E. How to bind Qpid destinations and connection factories into Tomcat JNDI</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/b3a90a4a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-ProducerFlowControl-Impact.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-ProducerFlowControl-Impact.html b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-ProducerFlowControl-Impact.html new file mode 100644 index 0000000..628493f --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-ProducerFlowControl-Impact.html @@ -0,0 +1,183 @@ +<!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 F. Impact of Broker enforced Producer Flow Control on Client - 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.2/index.html">Qpid JMS AMQP 0-x 6.3.2</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/index.html">Apache Qpid JMS AMQP 0-8/0-9/0-9-1</a></li><li>Appendix F. Impact of Broker enforced Producer Flow Control on Client</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 F. Impact of Broker enforced Producer Flow Control on Client</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> </td></tr></table><hr /></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="JMS-Client-0-8-Appendix-ProducerFlowControl-Impact"></a>Appendix F. Impact of Broker enforced Producer Flow Control on Client</h1></div></div></div><p> + Producing sessions can be blocked by the Qpid Broker when <span class="emphasis"><em>Producer Flow Control</em></span> is enforced + either on + <a class="link" href="../../java-broker/book/Java-Broker-Runtime-Disk-Space-Management.html#Java-Broker-Runtime-Disk-Space-Management-Producer-Flow-Control" target="_top">exceeding of disk quota</a> + or breaching of queue capacity when + <a class="link" href="../../java-broker/book/Java-Broker-Concepts-Queues.html#Java-Broker-Concepts-Queue-OverflowPolicy" target="_top">Producer Flow Control Overflow Policy</a> + is configured on queue. + </p><p> + If a producer sends to a queue which is overfull, the broker will respond by + instructing the client not to send any more messages. The impact of this is + that any future attempts to send will block until the broker rescinds the flow control order. + </p><p> + While blocking the client will periodically log the fact that it is blocked waiting on flow control. + </p><pre class="programlisting"> + WARN Message send delayed by 5s due to broker enforced flow control + WARN Message send delayed by 10s due to broker enforced flow control + </pre><p> + After a set period the send will timeout and throw a JMSException to the calling code. + </p><p> + If such a JMSException is thrown, the message will not be sent to the broker, + however the underlying Session may still be active - in particular if the + Session is transactional then the current transaction will not be automatically + rolled back. Users may choose to either attempt to resend the message, or to + roll back any transactional work and close the Session. + </p><p> + Both the timeout delay and the periodicity of the warning messages can be set + using Java system properties. + </p><p> + The amount of time (in milliseconds) to wait before timing out + is controlled by the property qpid.flow_control_wait_failure. + </p><p> + The frequency at which the log message informing that the producer is flow + controlled is sent is controlled by the system property qpid.flow_control_wait_notify_period. + </p><p> + Adding the following to the command line to start the client would result in a timeout of one minute, + with warning messages every ten seconds: + </p><pre class="programlisting"> + -Dqpid.flow_control_wait_failure=60000 + -Dqpid.flow_control_wait_notify_period=10000 + </pre></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-Tomcat-JNDI-Integration.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> </td></tr><tr><td align="left" valign="top" width="40%">Appendix E. How to bind Qpid destinations and connection factories into Tomcat JNDI </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-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/b3a90a4a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.html b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.html new file mode 100644 index 0000000..51f2781 --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.html @@ -0,0 +1,266 @@ +<!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 E. How to bind Qpid destinations and connection factories into Tomcat JNDI - 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.2/index.html">Qpid JMS AMQP 0-x 6.3.2</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/index.html">Apache Qpid JMS AMQP 0-8/0-9/0-9-1</a></li><li>Appendix E. How to bind Qpid destinations and connection factories into Tomcat JNDI</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 E. How to bind Qpid destinations and connection factories into Tomcat JNDI</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Appendix-PooledConnecytionFactory.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-ProducerFlowControl-Impact.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-Tomcat-JNDI-Integration"></a>Appendix E. How to bind Qpid destinations and connection factories into Tomcat JNDI</h1></div></div></div><p> + Qpid client destinations and connection factories can be registered in external JNDI containers, for example, Tomcat JNDI implementation. + </p><p> + <code class="literal">org.apache.qpid.jndi.ObjectFactory</code> implements + <a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/spi/ObjectFactory.html" target="_top">javax.naming.spi.ObjectFactory</a> + allowing it to create instances of <code class="literal">AMQConnectionFactory</code>, <code class="literal">PooledConnectionFactory</code>, + <code class="literal">AMQConnection</code>, <code class="literal">AMQQueue</code> and <code class="literal">AMQTopic</code> in external JNDI container from + <a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/Reference.html" target="_top">javax.naming.Reference</a>s. + </p><p>Additionally, + <code class="literal">AMQConnectionFactory</code>, <code class="literal">PooledConnectionFactory</code> and <code class="literal">AMQDestination</code> (parent of + <code class="literal">AMQQueue</code> and <code class="literal">AMQTopic</code>) implement + <a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/Referenceable.html" target="_top">javax.naming.Referenceable</a> + allowing creation of <a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/Reference.html" target="_top">javax.naming.Reference</a> objects + for binding in external JNDI implementations. + </p><p> + <code class="literal">org.apache.qpid.jndi.ObjectFactory</code> allows the creation of: + </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> + an instance of <code class="literal">ConnectionFactory</code> from a <code class="literal">Reference</code> containing reference + address (<a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/RefAddr.html" target="_top">javax.naming.RefAddr</a>) + <code class="literal">connectionURL</code> with content set to a + <a class="link" href="JMS-Client-0-8-Connection-URL.html" title="Chapter 7. Connection URLs">Connection URL</a>. + </p></li><li class="listitem"><p> + an instance of <code class="literal">PooledConnectionFactory</code> from a <code class="literal">Reference</code> containing reference + address (<a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/RefAddr.html" target="_top">javax.naming.RefAddr</a>) + <code class="literal">connectionURL</code> with content set to a + <a class="link" href="JMS-Client-0-8-Connection-URL.html" title="Chapter 7. Connection URLs">Connection URL</a>. + </p></li><li class="listitem"><p> + an instance of <code class="literal">AMQConnection</code> from a <code class="literal">Reference</code> containing reference + address (<a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/RefAddr.html" target="_top">javax.naming.RefAddr</a>) + <code class="literal">connectionURL</code> with content set to a + <a class="link" href="JMS-Client-0-8-Connection-URL.html" title="Chapter 7. Connection URLs">Connection URL</a>. + </p></li><li class="listitem"><p> + an instance of <code class="literal">AMQQueue</code> from a <code class="literal">Reference</code> containing reference + address (<a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/RefAddr.html" target="_top">javax.naming.RefAddr</a>) + <code class="literal">address</code> with content set to either <a class="link" href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-10-book/" target="_top">Address</a> or + <a class="link" href="JMS-Client-0-8-Binding-URL.html" title="Chapter 8. Binding URL">Binding URL</a>. + </p></li><li class="listitem"><p> + an instance of <code class="literal">AMQTopic</code> from a <code class="literal">Reference</code> containing reference + address (<a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/RefAddr.html" target="_top">javax.naming.RefAddr</a>) + <code class="literal">address</code> with content set to either <a class="link" href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-10-book/" target="_top">Address</a> or + <a class="link" href="JMS-Client-0-8-Binding-URL.html" title="Chapter 8. Binding URL">Binding URL</a>. + </p></li></ul></div><p> + </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> + For <code class="literal">AMQQueue</code> and <code class="literal">AMQTopic</code> prefix <code class="literal">BURL:</code> need + to be specified for <a class="link" href="JMS-Client-0-8-Binding-URL.html" title="Chapter 8. Binding URL">Binding URL</a>. Otherwise, client will try + to parse content using <a class="link" href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-10-book/" target="_top">Address</a> format. + </p></div><p> + </p><p>An example below demonstrates how to create JNDI resources in the Tomcat container using Resource declarations in context.xml + (A Tomcat specific web application configuration file usually added into war under /META-INF/context.xml). + </p><div class="example"><a id="d0e3573"></a><p class="title"><strong>Example E.1. An example of Tomcat context.xml declaring Qpid JNDI resources</strong></p><div class="example-contents"><pre class="programlisting"> +<?xml version='1.0' encoding='utf-8'?> +<!DOCTYPE xml> +<Context> + + <Resource name="jms/connectionFactory" auth="Container" + type="org.apache.qpid.client.AMQConnectionFactory" + factory="org.apache.qpid.jndi.ObjectFactory" + connectionURL="amqp://guest:guest@clientid/?brokerlist='localhost:5672'"/> + + <Resource name="jms/pooledConnectionFactory" auth="Container" + type="org.apache.qpid.client.PooledConnectionFactory" + factory="org.apache.qpid.jndi.ObjectFactory" + connectionURL="amqp://guest:guest@clientid/?brokerlist='localhost:5672'" + maxPoolSize="20" connectionTimeout="60000"/> + + <Resource name="jms/queue" auth="Container" + type="org.apache.qpid.client.AMQQueue" + factory="org.apache.qpid.jndi.ObjectFactory" + address="BURL:direct://amq.direct//myQueue?durable='true'"/> + + <Resource name="jms/topic" auth="Container" + type="org.apache.qpid.client.AMQTopic" + factory="org.apache.qpid.client.AMQConnectionFactory" + address="BURL:topic://amq.topic//myTopic?routingkey='myTopic'"/> + +</Context></pre></div></div><br class="example-break" /><p>In the example above <code class="literal">AMQConnectionFactory</code> would be registered under JNDI name "jms/connectionFactory", + <code class="literal">PooledConnectionFactory</code> would be registered under JNDI name "jms/pooledConnectionFactory", + <code class="literal">Queue</code> "myQueue" would be registered under JNDI name "jms/queue" and JMS <code class="literal">Topic</code> + destination "myTopic" would be registered under JNDI name "jms/topic". (All resources will be bound under "java:comp/env"). + On declaration of <code class="literal">PooledConnectionFactory</code> optional maxPoolSize and connectionTimeout are set to + 20 and 60000 milliseconds accordingly. + </p><p> + The client application can find the resources declared in Tomcat context.xml using the code below: + </p><div class="example"><a id="d0e3597"></a><p class="title"><strong>Example E.2. An example of JNDI lookup for Qpid resources registered in Tomcat JNDI</strong></p><div class="example-contents"><pre class="programlisting"> + Context context = new InitialContext(); + Context environmentContext = (Context)context.lookup("java:comp/env"); + ... + ConnectionFactory connectionFactory = (ConnectionFactory) environmentContext.lookup("jms/connectionFactory"); + ... + Queue queue = (Queue)environmentContext.lookup("jms/queue"); + ... + Topic topic = (Topic)environmentContext.lookup("jms/topic"); + ...</pre></div></div><br class="example-break" /><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> + In order to support backward compatibility <code class="literal">AMQConnectionFactory</code> continues to implement + <a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/spi/ObjectFactory.html" target="_top">javax.naming.spi.ObjectFactory</a> + and can be used to instantiate JNDI resources from + <a class="link" href="http://docs.oracle.com/javase/7/docs/api/javax/naming/Reference.html" target="_top">javax.naming.Reference</a>s. + However, its method <code class="literal">getObjectInstance</code> is marked as <code class="literal">Deprecated</code> and will be + removed in future version of client. For backward compatibility, Qpid JNDI resources can be declared using fully + qualified class names as addresses. That will became unsupported in future version as well. + An example of Tomcat context.xml with declarations of JNDI resources using deprecated factory and addresses is provided below. + </p><div class="example"><a id="d0e3620"></a><p class="title"><strong>Example E.3. An example of Tomcat context.xml declaring Qpid JNDI resources using deprecated <code class="literal">ObjectFactory</code> and deprecated addresses</strong></p><div class="example-contents"><pre class="programlisting"> +<?xml version='1.0' encoding='utf-8'?> +<!DOCTYPE xml> +<Context> + + <Resource name="jms/queue" auth="Container" + type="org.apache.qpid.client.AMQQueue" + factory="org.apache.qpid.client.AMQConnectionFactory" + org.apache.qpid.client.AMQQueue="direct://amq.direct//myDurableQueue?durable='true'"/> + + <Resource name="jms/topic" auth="Container" + type="org.apache.qpid.client.AMQTopic" + factory="org.apache.qpid.client.AMQConnectionFactory" + org.apache.qpid.client.AMQTopic="topic://amq.topic//myTopic?routingkey='myTopic'"/> + + <Resource name="jms/connectionFactory" auth="Container" + type="org.apache.qpid.client.AMQConnectionFactory" + factory="org.apache.qpid.client.AMQConnectionFactory" + org.apache.qpid.client.AMQConnectionFactory="amqp://guest:guest@clientid/?brokerlist='localhost:5672'"/> + +</Context></pre></div></div><p><br class="example-break" /> + </p></div></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="JMS-Client-0-8-Appendix-PooledConnecytionFactory.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-0-8-Appendix-ProducerFlowControl-Impact.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">Appendix D. PooledConnectionFactory </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 F. Impact of Broker enforced Producer Flow Control on 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/b3a90a4a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Binding-URL.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Binding-URL.html b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Binding-URL.html new file mode 100644 index 0000000..16187b5 --- /dev/null +++ b/content/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/JMS-Client-0-8-Binding-URL.html @@ -0,0 +1,222 @@ +<!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 8. Binding URL - 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.2/index.html">Qpid JMS AMQP 0-x 6.3.2</a></li><li><a href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-8-book/index.html">Apache Qpid JMS AMQP 0-8/0-9/0-9-1</a></li><li>Chapter 8. Binding URL</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 8. Binding URL</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Connection-URL.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="JMS-Client-Message-Encryption.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="JMS-Client-0-8-Binding-URL"></a>Chapter 8. Binding URL</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="JMS-Client-0-8-Binding-URL.html#JMS-Client-0-8-Binding-URL-Examples">8.1. Binding URL Examples</a></span></dt><dd><dl><dt><span class="section"><a href="JMS-Client-0-8-Binding-URL.html#JMS-Client-0-8-Binding-URL-JMS-Queues">8.1.1. Binding URLs for declaring of JMS Queues</a></span></dt><dt><span class="section"><a href="JMS-Client-0-8-Binding-URL.html#JMS-Client-0-8-Binding-URL-JMS-Topics">8.1.2. Binding URLs for declaring of JMS Topics</a></span></dt><dt><span class="section"><a href="JMS-Client-0-8-Binding-URL.html#JMS-Client-0-8-Binding-URL-Topics-Wildcards">8.1.3. Wildcard characters in routing keys for topic destinations</a></span></dt><dt><span class="section"><a href="JMS-Client-0-8-Binding-URL.html#JMS-Client-0-8-Binding-URL-Extra-Examples">8.1.4. More Examples</a></span></dt></dl></dd></dl></div><p> The <span class="emphasis"><em>Binding URL</em></span> syntax for addressing<a class="footnote" href="#ftn.d0e1616" id="d0e1616"><sup class="footnote">[5]</sup></a>. It allows the specification of the bindings between a queue and an exchange, queue + and exchange creation arguments and some ancillary options.</p><p> The format for a <span class="emphasis"><em>Binding URL</em></span> is provided below </p><pre class="screen"> +<Exchange Class>://<Exchange Name>/[<Destination>]/[<Queue>][?<option>='<value>'[&<option>='<value>']] + </pre><p> where </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><span class="emphasis"><em>Exchange Class</em></span>, specifies the type of the exchange, for example, + <span class="emphasis"><em>direct</em></span>,<span class="emphasis"><em>topic</em></span>,<span class="emphasis"><em>fanout</em></span>, etc. + </p></li><li class="listitem"><p><span class="emphasis"><em>Exchange Name</em></span>, specifies the name of the exchange, for example, + <span class="emphasis"><em>amq.direct</em></span>,<span class="emphasis"><em>amq.topic</em></span>, etc. </p></li><li class="listitem"><p><span class="emphasis"><em>Destination</em></span>, is an optional part of <span class="emphasis"><em>Binding + URL</em></span>. It can be used to specify a routing key with the non direct exchanges if + an option <span class="emphasis"><em>routingkey</em></span> is not specified. If both + <span class="emphasis"><em>Destination</em></span> and option <span class="emphasis"><em>routingkey</em></span> are + specified, then option <span class="emphasis"><em>routingkey</em></span> has precedence. </p></li><li class="listitem"><p><span class="emphasis"><em>Queue</em></span>, is an optional part of <span class="emphasis"><em>Binding URL</em></span> to + specify a queue name for JMS queue destination. It is ignored in JMS topic destinations. + Queue names may consist of any mixture of digits, letters, and underscores </p></li><li class="listitem"><p><span class="emphasis"><em>Options</em></span>, key-value pairs separated by '=' character specifying + queue and exchange creation arguments, routing key, client behaviour, etc. </p></li></ul></div><p> + </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Binding URL option quoting</h3><p>Take care with the quoting surrounding option values. Each option value + <span class="emphasis"><em>must</em></span> be surrounded with single quotes ('). </p></div><p> The following <span class="emphasis"><em>Binding URL</em></span> options are currently defined: </p><div class="table"><a id="d0e1707"></a><p class="title"><strong>Table 8.1. Binding URL options </strong></p><div class="table-contents"><table border="1" summary="Binding URL options " width="100%"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Option</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><p>durable</p></td><td><p>boolean </p></td><td><p>Queue durability flag. If it is set to <span class="emphasis"><em>true</em></span>, a durable + queue is requested to create. The durable queue should be stored on the Broker and + remained there after Broker restarts until it is explicitly deleted. This option has + no meaning for JMS topic destinations, as by nature a topic destination only exists + when a subscriber is connected. If durability is required for topic destinations, + the durable subscription should be created.</p></td></tr><tr><td><p>exclusive</p></td><td><p>boolean </p></td><td><p>Queue exclusivity flag. The client cannot use a queue that was declared as + exclusive by another still-open connection.</p></td></tr><tr><td><p>autodelete</p></td><td><p>boolean </p></td><td><p>Queue auto-deletion flag. If it is set to <span class="emphasis"><em>true</em></span> on + queue creation, the queue is deleted if there are no remaining + subscribers.</p></td></tr><tr><td><p>exchangeautodelete</p></td><td><p>boolean </p></td><td><p>Exchange auto-deletion flag.</p></td></tr><tr><td><p>exchangedurable</p></td><td><p>boolean </p></td><td><p>Exchange durability flag. If it is set to <span class="emphasis"><em>true</em></span> when + creating a new exchange, the exchange will be marked as durable. Durable exchanges + should remain active after Broker restarts. Non-durable exchanges are deleted on + following Broker restart.</p></td></tr><tr><td><p>routingkey</p></td><td><p>string </p></td><td> + <p> Defines the value of the binding key to bind a queue to the exchange. It is + always required to specify for JMS topic destinations. If routing key option is not + set in <span class="emphasis"><em>Binding URL</em></span> and direct exchange class is specified, the + queue name is used as a routing key. <span class="emphasis"><em>MessagePublisher</em></span> uses + routing key to publish messages onto exchange. </p> + </td></tr><tr><td><p>browse</p></td><td><p>boolean </p></td><td><p>If set to <span class="emphasis"><em>true</em></span> on a destination for a message + consumer, such consumer can only read messages on the queue but cannot consume them. + The consumer behaves like a queue browser in this case.</p></td></tr><tr><td><a id="JMS-Client-0-8-Binding-URL-Options-RejectBehaviour"></a><p>rejectbehaviour</p></td><td><p>string </p></td><td><p>Defines the reject behaviour for the re-delivered messages. If set to + 'SERVER' the client delegates the requeue/DLQ decision to the server. If this option + is not specified, the messages won't be moved to the DLQ (or dropped) when delivery + count exceeds the maximum. </p></td></tr><tr><td><a id="JMS-Client-0-8-Binding-URL-Options-SendEncrypted"></a><p>sendencrypted</p></td><td><p>boolean </p></td><td><p>If true then encrypt every message sent to this address. </p></td></tr><tr><td><a id="JMS-Client-0-8-Binding-URL-Options-EncryptedRecipients"></a><p>encryptedrecipients</p></td><td><p>string </p></td><td><p>A semi-colon separated list of the names of the recipients who will be able to decrypt the + message. </p></td></tr><tr><td><a id="JMS-Client-0-8-Binding-URL-Options-DeliveryDelay"></a><p>deliveryDelay</p></td><td><p>long </p></td><td><p>The delay (in milliseconds) between the time a message is sent by a MessageProducer, and + the earliest time it becomes visible to consumers on any queue onto which it has been placed. Note that + this value only has an affect on brokers which support the feature (currently only the Apache Qpid + Broker-J), and only on queues where delivery delay has been enabled.</p></td></tr></tbody></table></div></div><p><br class="table-break" /> + </p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="JMS-Client-0-8-Binding-URL-Examples"></a>8.1. Binding URL Examples</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="JMS-Client-0-8-Binding-URL-JMS-Queues"></a>8.1.1. Binding URLs for declaring of JMS Queues</h3></div></div></div><p>The Qpid client Binding URLs for JMS queue destinations can be declared using direct + exchange (Mostly it is a pre-defined exchange with a name "amq.direct". Also, custom direct + exchanges can be used.): </p><pre class="screen"> +direct://amq.direct//<Queue Name> + </pre><p> + </p><p>The Binding URLs for destinations created with calls to + <span class="emphasis"><em>Session.createQueue(String)</em></span> can be expressed as </p><pre class="screen"> +direct://amq.direct//<Queue Name>?durable='true' + </pre><p> The durability flag is set to <span class="emphasis"><em>true</em></span> in such destinations. </p><div class="example"><a id="d0e1873"></a><p class="title"><strong>Example 8.1. Binding URL examples for JMS queues</strong></p><div class="example-contents"><pre class="screen"> +direct://amq.direct//myNonDurableQueue +direct://amq.direct//myDurableQueue?durable='true' +direct://amq.direct//myAnotherQueue?durable='true'&routingkey='myqueue' +direct://amq.direct//myQueue?durable='true'&routingkey='myqueue'&rejectbehaviour='server' +direct://custom.direct//yetAnotherQueue + </pre></div></div><br class="example-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="JMS-Client-0-8-Binding-URL-JMS-Topics"></a>8.1.2. Binding URLs for declaring of JMS Topics</h3></div></div></div><p>The Binding URLs for JMS queue destinations can be declared using topic exchange (A + pre-defined exchange having name "amq.topic" is used mainly. However, custom topic exchanges + can be used as well): </p><pre class="screen"> +topic://amq.topic//<Queue name>?routingkey='<Topic Name>'&exclusive='true'&autodelete='true' + </pre><p> + </p><p>The Binding URLs for a topic destination created with calls to + <span class="emphasis"><em>Session.createTopic("hello")</em></span> is provided below: </p><div class="example"><a id="d0e1891"></a><p class="title"><strong>Example 8.2. Binding URL examples for JMS topics</strong></p><div class="example-contents"><pre class="screen"> +topic://amq.topic/hello/tmp_127_0_0_1_36973_1?routingkey='hello'&exclusive='true'&autodelete='true' + </pre></div></div><p><br class="example-break" /> + </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="JMS-Client-0-8-Binding-URL-Topics-Wildcards"></a>8.1.3. Wildcard characters in routing keys for topic destinations</h3></div></div></div><p> AMQP exchanges of class <span class="emphasis"><em>topic</em></span> can route messages to the queues + using special matches containing wildcard characters (a "#" matches one or more words, a "*" + matches a single word). The routing keys words are separated with a "." delimiter to + distinguish words for matching. Thus, if a consumer application specifies a routing key in + the destination like "usa.#", it should receive all the messages matching to that routing + key. For example, "usa.boston", "usa.new-york", etc. </p><p> The examples of the <span class="emphasis"><em>Binding URLs</em></span> having routing keys with + wildcards characters are provided below: </p><pre class="screen"> +topic://amq.topic?routingkey='stocks.#' +topic://amq.topic?routingkey='stocks.*.ibm' +topic://amq.topic?routingkey='stocks.nyse.ibm' + </pre><p> + </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="JMS-Client-0-8-Binding-URL-Extra-Examples"></a>8.1.4. More Examples</h3></div></div></div><div class="table"><a id="d0e1916"></a><p class="title"><strong>Table 8.2. Binding URL examples</strong></p><div class="table-contents"><table border="1" summary="Binding URL examples"><colgroup><col /><col /></colgroup><thead><tr><th>Binding URL</th><th>Description</th></tr></thead><tbody><tr><td><p>fanout://amq.fanout//myQueue</p></td><td><p>Binding URL binding queue "myQueue" to predefined "amq.fanout" exchange + of class "fanout"</p></td></tr><tr><td><p>topic://custom.topic//anotherQueue?routingkey='aq'</p></td><td><p>Binding URL binding queue "anotherQueue" to the exchange with name + "custom.topic" of class "topic" using binding key "aq".</p></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="footnotes"><br /><hr style="width:100; text-align:left;margin-left: 0" /><div class="footnote" id="ftn.d0e1616"><p><a class="para" href="#d0e1616"><sup class="para">[5] </sup></a>The client also supports the <span class="emphasis"><em>Address/ADDR</em></span> format. This is documented in <a class="link" href="/releases/qpid-jms-amqp-0-x-6.3.2/jms-amqp-0-10-book/" target="_top">Using the Qpid AMQP 0-10 JMS Client</a>.</p></div></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-Connection-URL.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="JMS-Client-Message-Encryption.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%"> Chapter 7. Connection URLs </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-Book.html">Home</a></td><td align="right" valign="top" width="40%"> Chapter 9. Message Encryption</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: [email protected] For additional commands, e-mail: [email protected]
