Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-HowTos.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-HowTos.html?rev=1372179&view=auto ============================================================================== --- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-HowTos.html (added) +++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-HowTos.html Sun Aug 12 19:03:49 2012 @@ -0,0 +1,243 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 2. How Tos</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="prev" href="High-Availability.html" title="1.6. High Availability"><link rel="next" href="Configuring-ACLS.html" title="2.2. Configuring ACLs"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpidâ¢</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpi d.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.htm l">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</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="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> > <span class="breadcrumb-node">How Tos</span></DIV><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Qpid-Java-Broker-HowTos"></a>Chapter 2. How Tos</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="Qpid-Java-Broker-HowTos.html#id2495214">2.1. + Add New Users + </a></span></dt><dd><dl><dt><span class="section"><a href="Qpid-Java-Broker-HowTos.html#AddNewUsers-AvailablePasswordfileformats">2.1.1. + Available + Password file formats + </a></span></dt><dt><span class="section"><a href="Qpid-Java-Broker-HowTos.html#AddNewUsers-Dynamicchangestopasswordfiles.">2.1.2. + Dynamic + changes to password files. + </a></span></dt><dt><span class="section"><a href="Qpid-Java-Broker-HowTos.html#AddNewUsers-HowpasswordfilesandPrincipalDatabasesrelatetoauthenticationmechanisms">2.1.3. + How password files and PrincipalDatabases relate to + authentication mechanisms + </a></span></dt></dl></dd><dt><span class="section"><a href="Configuring-ACLS.html">2.2. + Configuring ACLs + </a></span></dt><dd><dl><dt><span class="section"><a href="Configuring-ACLS.html#ConfigureACLs-EnablingACL">2.2.1. + Enabling ACLs + </a></span></dt><dt><span class="section"><a href="Configuring-ACLS.html#ConfigureACLs-WriteACL">2.2.2. + Writing .acl files + </a></span></dt><dt><span class="section"><a href="Configuring-ACLS.html#ConfigureACLs-Syntax">2.2.3. + Syntax + </a></span></dt><dt><span class="section"><a href="Configuring-ACLS.html#ConfigureACLs-WorkedExamples">2.2.4. + Worked Examples + </a></span></dt></dl></dd><dt><span class="section"><a href="Qpid-Java-SSL.html">2.3. + Configure Java Qpid to use a SSL connection. + </a></span></dt><dd><dl><dt><span class="section"><a href="Qpid-Java-SSL.html#ConfigureJavaQpidtouseaSSLconnection.-UsingSSLconnectionwithQpidJava.">2.3.1. + Using SSL connection with Qpid Java. + </a></span></dt><dt><span class="section"><a href="Qpid-Java-SSL.html#ConfigureJavaQpidtouseaSSLconnection.-Setup">2.3.2. + Setup + </a></span></dt><dt><span class="section"><a href="Qpid-Java-SSL.html#ConfigureJavaQpidtouseaSSLconnection.-Performingtheconnection.">2.3.3. + Performing + the connection. + </a></span></dt></dl></dd><dt><span class="section"><a href="Qpid-Java-Log4j.html">2.4. + Configure Log4j CompositeRolling Appender + </a></span></dt><dd><dl><dt><span class="section"><a href="Qpid-Java-Log4j.html#ConfigureLog4jCompositeRollingAppender-HowtoconfiguretheCompositeRollinglog4jAppender">2.4.1. + How to configure the CompositeRolling log4j Appender + </a></span></dt></dl></dd><dt><span class="section"><a href="Qpid-Java-Broker-Config-File.html">2.5. + Configure the Broker via config.xml + </a></span></dt><dd><dl><dt><span class="section"><a href="Qpid-Java-Broker-Config-File.html#ConfiguretheBrokerviaconfig.xml-Brokerconfig.xmlOverview">2.5.1. + Broker config.xml Overview + </a></span></dt><dt><span class="section"><a href="Qpid-Java-Broker-Config-File.html#ConfiguretheBrokerviaconfig.xml-QpidVersion">2.5.2. + Qpid + Version + </a></span></dt></dl></dd><dt><span class="section"><a href="Qpid-Java-Broker-Virtualhosts-Config.html">2.6. + Configure the Virtual Hosts via virtualhosts.xml + </a></span></dt><dd><dl><dt><span class="section"><a href="Qpid-Java-Broker-Virtualhosts-Config.html#ConfiguretheVirtualHostsviavirtualhosts.xml-virtualhosts.xmlOverview">2.6.1. + virtualhosts.xml Overview + </a></span></dt></dl></dd><dt><span class="section"><a href="Java-Broker-Debug-Logging.html">2.7. + Debug using log4j + </a></span></dt><dd><dl><dt><span class="section"><a href="Java-Broker-Debug-Logging.html#Debugusinglog4j-Debuggingwithlog4jconfigurations">2.7.1. + Debugging + with log4j configurations + </a></span></dt></dl></dd><dt><span class="section"><a href="How-to-Tune-M3-Java-Broker-Performance.html">2.8. + How to Tune M3 Java Broker Performance + </a></span></dt><dd><dl><dt><span class="section"><a href="How-to-Tune-M3-Java-Broker-Performance.html#HowtoTuneM3JavaBrokerPerformance-ProblemStatement">2.8.1. + Problem + Statement + </a></span></dt><dt><span class="section"><a href="How-to-Tune-M3-Java-Broker-Performance.html#HowtoTuneM3JavaBrokerPerformance-SuccessfulTuningOptions">2.8.2. + Successful + Tuning Options + </a></span></dt><dt><span class="section"><a href="How-to-Tune-M3-Java-Broker-Performance.html#HowtoTuneM3JavaBrokerPerformance-NextSteps">2.8.3. + Next + Steps + </a></span></dt></dl></dd><dt><span class="section"><a href="Qpid-Java-Build-HowTo.html">2.9. + Qpid Java Build How To + </a></span></dt><dd><dl><dt><span class="section"><a href="Qpid-Java-Build-HowTo.html#QpidJavaBuildHowTo-BuildInstructionsGeneral">2.9.1. + Build + Instructions - General + </a></span></dt><dt><span class="section"><a href="Qpid-Java-Build-HowTo.html#QpidJavaBuildHowTo-BuildInstructionsTrunk">2.9.2. + Build + Instructions - Trunk + </a></span></dt></dl></dd><dt><span class="section"><a href="Priority-Queues.html">2.10. + Use Priority Queues + </a></span></dt><dd><dl><dt><span class="section"><a href="Priority-Queues.html#UsePriorityQueues-GeneralInformation">2.10.1. + General + Information + </a></span></dt><dt><span class="section"><a href="Priority-Queues.html#UsePriorityQueues-DefiningPriorityQueues">2.10.2. + Defining + Priority Queues + </a></span></dt><dt><span class="section"><a href="Priority-Queues.html#UsePriorityQueues-Clientconfiguration-2Fmessagingmodelforpriorityqueues">2.10.3. + Client configuration/messaging model for priority queues + </a></span></dt></dl></dd><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html">2.11. Slow Consumer Disconnect - User Guide</a></span></dt><dd><dl><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id2526441">2.11.1. Introduction</a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id2526475">2.11.2. What can it do?</a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id2526501">2.11.3. Frequency of SCD Checking</a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id2526581">2.11.4. Client Exception<span class="bold"><strong>s</strong></span></a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id2526640">2.11.5. Disconnection Thresholds</a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id2526871">2.11.6. Important Points To Note</a></span></dt></dl></dd></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2495214"></a>2.1. + Add New Users + </h2></div></div></div><p> + The Qpid Java Broker has a single reference source (<a class="xref" href="">???</a>) that + defines all the users in the system. + </p><p> + To add a new user to the broker the password file must be + updated. The details about adding entries and when these updates + take effect are dependent on the file format each of which are + described below. + </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="AddNewUsers-AvailablePasswordfileformats"></a>2.1.1. + Available + Password file formats + </h3></div></div></div><p> + There are currently two different file formats available for use + depending on the PrincipalDatabase that is desired. In all cases + the clients need not be aware of the type of PrincipalDatabase in + use they only need support the SASL mechanisms they provide. + </p><div class="itemizedlist"><ul><li><p> + <a class="xref" href="Qpid-Java-Broker-HowTos.html#AddNewUsers-Plain" title="2.1.1.1. Plain">Section 2.1.1.1, â + Plain + â</a> + </p></li><li><p> + <a class="xref" href="Qpid-Java-Broker-HowTos.html#AddNewUsers-Base64MD5PasswordFileFormat" title="2.1.1.3. Base64MD5 Password File Format">Section 2.1.1.3, â + Base64MD5 + Password File Format + â</a> + </p></li></ul></div><p> + + </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="AddNewUsers-Plain"></a>2.1.1.1. + Plain + </h4></div></div></div><p> + The plain file has the following format: + </p><pre class="programlisting"> +# Plain password authentication file. +# default name : passwd +# Format <username>:<password> +#e.g. +martin:password +</pre><p> + As the contents of the file are plain text and the password is + taken to be everything to the right of the ':'(colon). The + password, therefore, cannot contain a ':' colon, but this can be + used to delimit the password. + </p><p> + Lines starting with a '#' are treated as comments. + </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="AddNewUsers-Whereisthepasswordfileformybroker-3F"></a>2.1.1.2. + Where is + the password file for my broker ? + </h4></div></div></div><p> + The location of the password file in use for your broker is as + configured in your config.xml file. + </p><pre class="programlisting"> +<principal-databases> + <principal-database> + <name>passwordfile</name> + <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class> + <attributes> + <attribute> + <name>passwordFile</name> + <value>${conf}/passwd</value> + </attribute> + </attributes> + </principal-database> + </principal-databases> +</pre><p> + So in the example config.xml file this password file lives in the + directory specified as the conf directory (at the top of your + config.xml file). + </p><p> + If you wish to use Base64 encoding for your password file, then + in the <class> element above you should specify + org.apache.qpid.server.security.auth.database.Base64MD5PasswordFilePrincipalDatabase + </p><p> + The default is: + </p><pre class="programlisting"> + <conf>${prefix}/etc</conf> +</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="AddNewUsers-Base64MD5PasswordFileFormat"></a>2.1.1.3. + Base64MD5 + Password File Format + </h4></div></div></div><p> + This format can be used to ensure that SAs cannot read the plain + text password values from your password file on disk. + </p><p> + The Base64MD5 file uses the following format: + </p><pre class="programlisting"> +# Base64MD5 password authentication file +# default name : qpid.passwd +# Format <username>:<Base64 Encoded MD5 hash of the users password> +#e.g. +martin:X03MO1qnZdYdgyfeuILPmQ== +</pre><p> + As with the Plain format the line is delimited by a ':'(colon). + The password field contains the MD5 Hash of the users password + encoded in Base64. + </p><p> + This file is read on broker start-up and is not re-read. + </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="AddNewUsers-HowcanIupdateaBase64MD5passwordfile-3F"></a>2.1.1.4. + How can + I update a Base64MD5 password file ? + </h4></div></div></div><p> + To update the file there are two options: + </p><div class="orderedlist"><ol type="1"><li><p>Edit the file by hand using the <span class="emphasis"><em>qpid-passwd</em></span> tool + that will generate the required lines. The output from the tool + is the text that needs to be copied in to your active password + file. This tool is located in the broker bin directory. + Eventually it is planned for this tool to emulate the + functionality of <a class="xref" href="">???</a> + for qpid passwd files. + <span class="emphasis"><em>NOTE:</em></span> For the changes to be seen by the broker you must + either restart the broker or reload the data with the + management tools (see <a class="xref" href="Qpid-JMX-Management-Console.html#Qpid-JMX-Management-Console-User-Guide" title="3.1.1.5. Qpid JMX Management Console User Guide">Section 3.1.1.5, â + Qpid JMX Management Console User Guide + â</a>) + </p></li><li><p>Use the management tools to create a new user. The changes + will be made by the broker to the password file and the new user + will be immediately available to the system (see <a class="xref" href="Qpid-JMX-Management-Console.html#Qpid-JMX-Management-Console-User-Guide" title="3.1.1.5. Qpid JMX Management Console User Guide">Section 3.1.1.5, â + Qpid JMX Management Console User Guide + â</a>). + </p></li></ol></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="AddNewUsers-Dynamicchangestopasswordfiles."></a>2.1.2. + Dynamic + changes to password files. + </h3></div></div></div><p> + The Plain password file and the Base64MD5 format file are both + only read once on start up. + </p><p> + To make changes dynamically there are two options, both require + administrator access via the Management Console (see <a class="xref" href="Qpid-JMX-Management-Console.html#Qpid-JMX-Management-Console-User-Guide" title="3.1.1.5. Qpid JMX Management Console User Guide">Section 3.1.1.5, â + Qpid JMX Management Console User Guide + â</a>) + </p><div class="orderedlist"><ol type="1"><li><p>You can replace the file and use the console to reload its + contents. + </p></li><li><p>The management console provides an interface to create, + delete and amend the users. These changes are written back to the + active password file. + </p></li></ol></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="AddNewUsers-HowpasswordfilesandPrincipalDatabasesrelatetoauthenticationmechanisms"></a>2.1.3. + How password files and PrincipalDatabases relate to + authentication mechanisms + </h3></div></div></div><p> + For each type of password file a PrincipalDatabase exists that + parses the contents. These PrincipalDatabases load various SASL + mechanism based on their supportability. e.g. the Base64MD5 file + format can't support Plain authentication as the plain password + is not available. Any client connecting need only be concerned + about the SASL module they support and not the type of + PrincipalDatabase. So I client that understands CRAM-MD5 will + work correctly with a Plain and Base64MD5 PrincipalDatabase. + </p><div class="table"><a name="id2497269"></a><p class="title"><b>Table 2.1. File Format and Principal Database</b></p><div class="table-contents"><table summary="File Format and Principal Database" border="1"><colgroup><col><col></colgroup><tbody><tr><td> + FileFormat/PrincipalDatabase + </td><td> + SASL + </td></tr><tr><td> + Plain + </td><td> + AMQPLAIN PLAIN CRAM-MD5 + </td></tr><tr><td> + Base64MD5 + </td><td> + CRAM-MD5 CRAM-MD5-HASHED + </td></tr></tbody></table></div></div><br class="table-break"><p> + For details of SASL support see <a class="xref" href="">???</a> + </p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="High-Availability.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="Configuring-ACLS.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.6. High Availability </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.2. + Configuring ACLs + </td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>
Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Virtualhosts-Config.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Virtualhosts-Config.html?rev=1372179&view=auto ============================================================================== --- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Virtualhosts-Config.html (added) +++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Virtualhosts-Config.html Sun Aug 12 19:03:49 2012 @@ -0,0 +1,99 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.6. Configure the Virtual Hosts via virtualhosts.xml</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="Qpid-Java-Broker-HowTos.html" title="Chapter 2. How Tos"><link rel="prev" href="Qpid-Java-Broker-Config-File.html" title="2.5. Configure the Broker via config.xml"><link rel="next" href="Java-Broker-Debug-Logging.html" title="2.7. Debug using log4j"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpidâ¢</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href= "http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Ab out Apache</H3><UL><LI><A href="http://www.apache.org">Home</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="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> > <span class="breadcrumb-link"><a href="Qpid-Java-Broker-HowTos.html">How Tos</a></span> > <span class="breadcrumb-node"> + Configure the Virtual Hosts via virtualhosts.xml + </span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Qpid-Java-Broker-Virtualhosts-Config"></a>2.6. + Configure the Virtual Hosts via virtualhosts.xml + </h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ConfiguretheVirtualHostsviavirtualhosts.xml-virtualhosts.xmlOverview"></a>2.6.1. + virtualhosts.xml Overview + </h3></div></div></div><p> + This configuration file contains details of all queues and + topics, and associated properties, to be created on broker + startup. These details are configured on a per virtual host + basis. + </p><p> + Note that if you do not add details of a queue or topic you + intend to use to this file, you must first create a consumer on a + queue/topic before you can publish to it using Qpid. + </p><p> + Thus most application deployments need a virtualhosts.xml file + with at least some minimal detail. + </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ConfiguretheVirtualHostsviavirtualhosts.xml-XMLFormatwithComments"></a>2.6.1.1. + XML Format with Comments + </h4></div></div></div><p> + The virtualhosts.xml which currently ships as part of the Qpid + distribution is really targeted at development use, and supports + various artifacts commonly used by the Qpid development team. + </p><p> + As a result, it is reasonably complex. In the example XML below, + I have tried to simplify one example virtual host setup which is + possibly more useful for new users of Qpid or development teams + looking to simply make use of the Qpid broker in their + deployment. + </p><p> + I have also added some inline comments on each section, which + should give some extra information on the purpose of the various + elements. + </p><pre class="programlisting"> +<virtualhosts> + <!-- Sets the default virtual host for connections which do not specify a vh --> + <default>localhost</default> + <!-- Define a virtual host and all it's config --> + <virtualhost> + <name>localhost</name> + <localhost> + <!-- Define the types of additional AMQP exchange available for this vh --> + <!-- Always get amq.direct (for queues) and amq.topic (for topics) by default --> + <exchanges> + <!-- Example of declaring an additional exchanges type for developer use only --> + <exchange> + <type>direct</type> + <name>test.direct</name> + <durable>true</durable> + </exchange> + </exchanges> + + <!-- Define the set of queues to be created at broker startup --> + <queues> + <!-- The properties configured here will be applied as defaults to all --> + <!-- queues subsequently defined unless explicitly overridden --> + <exchange>amq.direct</exchange> + <!-- Set threshold values for queue monitor alerting to log --> + <maximumQueueDepth>4235264</maximumQueueDepth> <!-- 4Mb --> + <maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb --> + <maximumMessageAge>600000</maximumMessageAge> <!-- 10 mins --> + + <!-- Define a queue with all default settings --> + <queue> + <name>ping</name> + </queue> + <!-- Example definitions of queues with overriden settings --> + <queue> + <name>test-queue</name> + <test-queue> + <exchange>test.direct</exchange> + <durable>true</durable> + </test-queue> + </queue> + <queue> + <name>test-ping</name> + <test-ping> + <exchange>test.direct</exchange> + </test-ping> + </queue> + </queues> + </localhost> + </virtualhost> +</virtualhosts> +</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="ConfiguretheVirtualHostsviavirtualhosts.xml-Usingyourownvirtualhosts.xml"></a>2.6.1.2. + Using your own virtualhosts.xml + </h4></div></div></div><p> + Note that the config.xml file shipped as an example (or developer + default) in the Qpid distribution contains an element which + defines the path to the virtualhosts.xml. + </p><p> + When using your own virtualhosts.xml you must edit this path to + point at the location of your file. + </p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Qpid-Java-Broker-Config-File.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Qpid-Java-Broker-HowTos.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Debug-Logging.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.5. + Configure the Broker via config.xml +  </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.7. + Debug using log4j + </td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html> Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Build-HowTo.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Build-HowTo.html?rev=1372179&view=auto ============================================================================== --- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Build-HowTo.html (added) +++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Build-HowTo.html Sun Aug 12 19:03:49 2012 @@ -0,0 +1,211 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.9. Qpid Java Build How To</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="Qpid-Java-Broker-HowTos.html" title="Chapter 2. How Tos"><link rel="prev" href="How-to-Tune-M3-Java-Broker-Performance.html" title="2.8. How to Tune M3 Java Broker Performance"><link rel="next" href="Priority-Queues.html" title="2.10. Use Priority Queues"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpidâ¢</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache. org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI>< LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL>< LI><A href="http://www.apache.org">Home</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="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> > <span class="breadcrumb-link"><a href="Qpid-Java-Broker-HowTos.html">How Tos</a></span> > <span class="breadcrumb-node"> + Qpid Java Build How To + </span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Qpid-Java-Build-HowTo"></a>2.9. + Qpid Java Build How To + </h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="QpidJavaBuildHowTo-BuildInstructionsGeneral"></a>2.9.1. + Build + Instructions - General + </h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBuildHowTo-Checkoutthesource"></a>2.9.1.1. + Check out the + source + </h4></div></div></div><p> + Firstly, check the source for Qpid out of our subversion + repository: + </p><p> + <a class="xref" href="">???</a> + </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBuildHowTo-Prerequisites"></a>2.9.1.2. + Prerequisites + </h4></div></div></div><p> + For the broker code you need JDK 1.5.0_15 or later. You should + set JAVA_HOME and include the bin directory in your PATH. + </p><p> + Check it's ok by executing java -v ! + </p><p> + If you are wanting to run the python tests against the broker you + will of course need a version of python. + </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="QpidJavaBuildHowTo-BuildInstructionsTrunk"></a>2.9.2. + Build + Instructions - Trunk + </h3></div></div></div><p> + Our build system has reverted to ant as of May 2008. + </p><p> + The ant target 'help' will tell you what you need to know about + the build system. + </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBuildHowTo-AntBuildScripts"></a>2.9.2.1. + Ant Build + Scripts + </h4></div></div></div><p> + Currently the Qpid java project builds using ant. + </p><p> + The ant build system is set up in a modular way, with a top level + build script and template for module builds and then a module + level build script which inherits from the template. + </p><p> + So, at the top level there are: + </p><div class="table"><a name="id2498638"></a><p class="title"><b>Table 2.8. </b></p><div class="table-contents"><table summary="" border="1"><colgroup><col><col></colgroup><tbody><tr><td> + File + </td><td> + Description + </td></tr><tr><td> + build.xml + </td><td> + Top level build file for the project which defines all the + build targets + </td></tr><tr><td> + common.xml + </td><td> + Common properties used throughout the build system + </td></tr><tr><td> + module.xml + </td><td> + Template used by all modules which sets up properties for + module builds + </td></tr></tbody></table></div></div><br class="table-break"><p> + Then, in each module subdirectory there is: + </p><div class="table"><a name="id2498707"></a><p class="title"><b>Table 2.9. </b></p><div class="table-contents"><table summary="" border="1"><colgroup><col><col></colgroup><tbody><tr><td> + File + </td><td> + Description + </td></tr><tr><td> + build.xml + </td><td> + Defines all the module values for template properties + </td></tr></tbody></table></div></div><br class="table-break"></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBuildHowTo-Buildtargets"></a>2.9.2.2. + Build targets + </h4></div></div></div><p> + The main build targets you are probably interested in are: + </p><div class="table"><a name="id2498763"></a><p class="title"><b>Table 2.10. </b></p><div class="table-contents"><table summary="" border="1"><colgroup><col><col></colgroup><tbody><tr><td> + Target + </td><td> + Description + </td></tr><tr><td> + build + </td><td> + Builds all source code for Qpid + </td></tr><tr><td> + test + </td><td> + Runs the testsuite for Qpid + </td></tr></tbody></table></div></div><br class="table-break"><p> + So, if you just want to compile everything you should run the + build target in the top level build.xml file. + </p><p> + If you want to build an installable version of Qpid, run the + archive task from the top level build.xml file. + </p><p> + If you want to compile an individual module, simply run the build + target from the appropriate module e.g. to compile the broker + source + </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBuildHowTo-ConfiguringEclipse"></a>2.9.2.3. + Configuring + Eclipse + </h4></div></div></div><p> + 1. Run the ant build from the root directory of Java trunk. + 2. New project -> create from existing file system for broker, + common, client, junit-toolkit, perftests, systests and each + directory under management + 4. Add the contents of lib/ to the build path + 5. Setup Generated Code + 6. Setup Dependencies + </p><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="QpidJavaBuildHowTo-GeneratedCode"></a> + Generated Code + </h5></div></div></div><p> + The Broker and Common packages both depend on generated code. + After running 'ant' the build/scratch directory will contain this + generated code. + For the broker module add build/scratch/broker/src + For the common module add build/scratch/common/src + </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="QpidJavaBuildHowTo-Dependencies"></a> + Dependencies + </h5></div></div></div><p> + These dependencies are correct at the time of writting however, + if things are not working you can check the dependencies by + looking in the modules build.xml file: + </p><pre class="programlisting"> +for i in `find . -name build.xml` ; do echo "$i:"; grep module.depends $i ; done +</pre><p> + The <span class="emphasis"><em>module.depend</em></span> value will detail which other modules + are dependencies. + </p><p> + broker + </p><div class="itemizedlist"><ul><li><p>common + </p></li><li><p>management/common + </p></li></ul></div><p> + client + </p><div class="itemizedlist"><ul><li><p>Common + </p></li></ul></div><p> + systest + </p><div class="itemizedlist"><ul><li><p>client + </p></li><li><p>management/common + </p></li><li><p>broker + </p></li><li><p>broker/test + </p></li><li><p>common + </p></li><li><p>junit-toolkit + </p></li><li><p>management/tools/qpid-cli + </p></li></ul></div><p> + perftests + </p><div class="itemizedlist"><ul><li><p>systests + </p></li><li><p>client + </p></li><li><p>broker + </p></li><li><p>common + </p></li><li><p>junit-toolkit + </p></li></ul></div><p> + management/eclipse-plugin + </p><div class="itemizedlist"><ul><li><p>broker + </p></li><li><p>common + </p></li><li><p>management/common + </p></li></ul></div><p> + management/console + </p><div class="itemizedlist"><ul><li><p>common + </p></li><li><p>client + </p></li></ul></div><p> + management/agent + </p><div class="itemizedlist"><ul><li><p>common + </p></li><li><p>client + </p></li></ul></div><p> + management/tools/qpid-cli + </p><div class="itemizedlist"><ul><li><p>common + </p></li><li><p>management/common + </p></li></ul></div><p> + management/client + </p><div class="itemizedlist"><ul><li><p>common + </p></li><li><p>client + </p></li></ul></div><p> + integrationtests + </p><div class="itemizedlist"><ul><li><p>systests + </p></li><li><p>client + </p></li><li><p>common + </p></li><li><p>junit-toolkit + </p></li></ul></div><p> + testkit + </p><div class="itemizedlist"><ul><li><p>client + </p></li><li><p>broker + </p></li><li><p>common + </p></li></ul></div><p> + tools + </p><div class="itemizedlist"><ul><li><p>client + </p></li><li><p>common + </p></li></ul></div><p> + client/examples + </p><div class="itemizedlist"><ul><li><p>common + </p></li><li><p>client + </p></li></ul></div><p> + broker-plugins + </p><div class="itemizedlist"><ul><li><p>client + </p></li><li><p>management/common + </p></li><li><p>broker + </p></li><li><p>common + </p></li><li><p>junit-toolkit + </p></li></ul></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBuildHowTo-Whatnext-3F"></a>2.9.2.4. + What next ? + </h4></div></div></div><p> + If you want to run your built Qpid package, see our <a class="xref" href="">???</a> for details of + how to do that. + </p><p> + If you want to run our tests, you can use the ant test or + testreport (produces a useful report) targets. + </p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="How-to-Tune-M3-Java-Broker-Performance.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Qpid-Java-Broker-HowTos.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Priority-Queues.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.8. + How to Tune M3 Java Broker Performance +  </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.10. + Use Priority Queues + </td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org