Added: qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-HowTos.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-HowTos.html?rev=1227030&view=auto ============================================================================== --- qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-HowTos.html (added) +++ qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-HowTos.html Wed Jan 4 02:22:58 2012 @@ -0,0 +1,297 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 2. How Tos</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.75.2"><link rel="home" 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="Java-Broker-Configuration-Guide.html" title="1.5. Broker Configuration Guide"><link rel="next" href="Configuring-ACLS.html" title="2.2. Configuring ACLs"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. How Tos</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Java-Broker-Configuration-Guide.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" al ign="right"> <a accesskey="n" href="Configuring-ACLS.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 2. How Tos"><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#id1326968">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#id1330231">2.11.1. Introduction</a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id1330260">2.11.2. What can it do?</a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id1330285">2.11.3. Frequency of SCD Checking</a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id1330361">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#id1330400">2.11.5. Disconnection Thresholds</a></span></dt><dt><span class="section"><a href="Java-Broker-Slow-Consumer-Disconnect.html#id1330486">2.11.6. Important Points To Note</a></span></dt></dl></dd></dl></div> + + + <div class="section" title="2.1. Add New Users"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1326968"></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" title="2.1.1. Available Password file formats"><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 class="itemizedlist" type="disc"><li class="listitem"><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 class="listitem"><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" title="2.1.1.1. Plain"><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" title="2.1.1.2. Where is the password file for my broker ?"><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" title="2.1.1.3. Base64MD5 Password File Format"><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" title="2.1.1.4. How can I update a Base64MD5 password file ?"><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 class="orderedlist" type="1"><li class="listitem"><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 class="listitem"><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" title="2.1.2. Dynamic changes to password files."><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 class="orderedlist" type="1"><li class="listitem"><p>You can replace the file and use the console to reload its + contents. + </p></li><li class="listitem"><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" title="2.1.3. How password files and PrincipalDatabases relate to authentication mechanisms"><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="id1327252"></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 class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Java-Broker-Configuration-Guide.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.5. Broker Configuration Guide </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></body></html>
Added: qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Management-CLI.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Management-CLI.html?rev=1227030&view=auto ============================================================================== --- qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Management-CLI.html (added) +++ qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Management-CLI.html Wed Jan 4 02:22:58 2012 @@ -0,0 +1,117 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2. Qpid Java Broker Management CLI</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.75.2"><link rel="home" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="QpidJavaBroker-ManagementTools.html" title="Chapter 4. Management Tools"><link rel="prev" href="QpidJavaBroker-ManagementTools.html" title="Chapter 4. Management Tools"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.2. + Qpid Java Broker Management CLI + </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="QpidJavaBroker-ManagementTools.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Management Tools</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="section" title="4.2. Qpid Java Broker Management CLI"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Qpid-Java-Broker-Management-CLI"></a>4.2. + Qpid Java Broker Management CLI + </h2></div></div></div> + <div class="section" title="4.2.1. How to build Apache Qpid CLI"><div class="titlepage"><div><div><h3 class="title"><a name="QpidJavaBrokerManagementCLI-HowtobuildApacheQpidCLI"></a>4.2.1. + How to + build Apache Qpid CLI + </h3></div></div></div> + + + <div class="section" title="4.2.1.1. Build Instructions - General"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBrokerManagementCLI-BuildInstructionsGeneral"></a>4.2.1.1. + Build + Instructions - General + </h4></div></div></div> + + <p> + At the very beginning please build Apache Qpid by refering this + installation guide from here <a class="xref" href="">???</a>. + </p><p> + After successfully build Apache Qpid you'll be able to start + Apache Qpid Java broker,then only you are in a position to use + Qpid CLI. + </p> +</div> + + <div class="section" title="4.2.1.2. Check out the Source"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBrokerManagementCLI-CheckouttheSource"></a>4.2.1.2. + Check + out the Source + </h4></div></div></div> + + <p> + First check out the source from subversion repository. Please + visit the following link for more information about different + versions of Qpid CLI. + </p><p> + <a class="xref" href="">???</a> + </p> +</div> + + <div class="section" title="4.2.1.3. Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBrokerManagementCLI-Prerequisites"></a>4.2.1.3. + 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> +</div> + + <div class="section" title="4.2.1.4. Building Apache Qpid CLI"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBrokerManagementCLI-BuildingApacheQpidCLI"></a>4.2.1.4. + Building + Apache Qpid CLI + </h4></div></div></div> + + <p> + This project is currently having only an ant build system.Please + install ant build system before trying to install Qpid CLI. + </p> +</div> + + + + <div class="section" title="4.2.1.5. Compiling"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBrokerManagementCLI-Compiling"></a>4.2.1.5. + Compiling + </h4></div></div></div> + + <p> + To compile the source please run following command + </p> + <pre class="programlisting"> +ant compile +</pre> + <p> + To compile the test source run the following command + </p> + <pre class="programlisting"> +ant compile-tests +</pre> +</div> + + + <div class="section" title="4.2.1.6. Running CLI"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBrokerManagementCLI-RunningCLI"></a>4.2.1.6. + Running CLI + </h4></div></div></div> + + <p> + After successful compilation set QPID_CLI environment variable to + the main source directory.(set the environment variable to the + directory where ant build script stored in the SVN + checkout).Please check whether the Qpid Java broker is up an + running in the appropriate location and run the following command + to start the Qpid CLI by running the qpid-cli script in the bin + directory. + </p><p> + $QPID_CLI/bin/qpid-cli -h <hostname of the broker> -p + <broker running port> + For more details please have a look in to README file which ships + with source package of Qpid CLI. + </p> +</div> + + + <div class="section" title="4.2.1.7. Other ant targets"><div class="titlepage"><div><div><h4 class="title"><a name="QpidJavaBrokerManagementCLI-Otheranttargets"></a>4.2.1.7. + Other + ant targets + </h4></div></div></div> + + <p>For now we are supporting those ant targets.</p> + + <div class="variablelist"><dl><dt><span class="term">ant clean</span></dt><dd><p>Clean the complete build including CLI build and test build.</p></dd><dt><span class="term">ant jar</span></dt><dd><p>Create the jar file for the project without test cases.</p></dd><dt><span class="term">ant init</span></dt><dd><p>Create the directory structure for build.</p></dd><dt><span class="term">ant compile-tests </span></dt><dd><p>This compiles all the test source.</p></dd><dt><span class="term">ant test </span></dt><dd><p>Run all the test cases.</p></dd></dl></div> + +</div> +</div> +</div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="QpidJavaBroker-ManagementTools.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="QpidJavaBroker-ManagementTools.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Management Tools </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> Added: qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Virtualhosts-Config.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Virtualhosts-Config.html?rev=1227030&view=auto ============================================================================== --- qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Virtualhosts-Config.html (added) +++ qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Broker-Virtualhosts-Config.html Wed Jan 4 02:22:58 2012 @@ -0,0 +1,114 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><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-NS Stylesheets V1.75.2"><link rel="home" 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 bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.6. + Configure the Virtual Hosts via virtualhosts.xml + </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Qpid-Java-Broker-Config-File.html">Prev</a> </td><th width="60%" align="center">Chapter 2. How Tos</th><td width="20%" align="right"> <a accesskey="n" href="Java-Broker-Debug-Logging.html">Next</a></td></tr></table><hr></div><div class="section" title="2.6. Configure the Virtual Hosts via virtualhosts.xml"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Qpid-Java-Broker-Virtualhosts-Config"></a>2.6. + Configure the Virtual Hosts via virtualhosts.xml + </h2></div></div></div><div class="section" title="2.6.1. virtualhosts.xml Overview"><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" title="2.6.1.1. XML Format with Comments"><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" title="2.6.1.2. Using your own virtualhosts.xml"><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 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></body></html> Added: qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Build-HowTo.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Build-HowTo.html?rev=1227030&view=auto ============================================================================== --- qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Build-HowTo.html (added) +++ qpid/site/docs/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Qpid-Java-Build-HowTo.html Wed Jan 4 02:22:58 2012 @@ -0,0 +1,248 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><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-NS Stylesheets V1.75.2"><link rel="home" 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 bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.9. + Qpid Java Build How To + </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="How-to-Tune-M3-Java-Broker-Performance.html">Prev</a> </td><th width="60%" align="center">Chapter 2. How Tos</th><td width="20%" align="right"> <a accesskey="n" href="Priority-Queues.html">Next</a></td></tr></table><hr></div><div class="section" title="2.9. Qpid Java Build How To"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Qpid-Java-Build-HowTo"></a>2.9. + Qpid Java Build How To + </h2></div></div></div> + + <div class="section" title="2.9.1. Build Instructions - General"><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" title="2.9.1.1. Check out the source"><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" title="2.9.1.2. Prerequisites"><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" title="2.9.2. Build Instructions - Trunk"><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" title="2.9.2.1. Ant Build Scripts"><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="id1329502"></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="id1329569"></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" title="2.9.2.2. Build targets"><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="id1329620"></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" title="2.9.2.3. Configuring Eclipse"><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" title="Generated Code"><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" title="Dependencies"><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 class="itemizedlist" type="disc"><li class="listitem"><p>common + </p></li><li class="listitem"><p>management/common + </p></li></ul></div><p> + client + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Common + </p></li></ul></div><p> + systest + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>client + </p></li><li class="listitem"><p>management/common + </p></li><li class="listitem"><p>broker + </p></li><li class="listitem"><p>broker/test + </p></li><li class="listitem"><p>common + </p></li><li class="listitem"><p>junit-toolkit + </p></li><li class="listitem"><p>management/tools/qpid-cli + </p></li></ul></div><p> + perftests + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>systests + </p></li><li class="listitem"><p>client + </p></li><li class="listitem"><p>broker + </p></li><li class="listitem"><p>common + </p></li><li class="listitem"><p>junit-toolkit + </p></li></ul></div><p> + management/eclipse-plugin + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>broker + </p></li><li class="listitem"><p>common + </p></li><li class="listitem"><p>management/common + </p></li></ul></div><p> + management/console + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>common + </p></li><li class="listitem"><p>client + </p></li></ul></div><p> + management/agent + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>common + </p></li><li class="listitem"><p>client + </p></li></ul></div><p> + management/tools/qpid-cli + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>common + </p></li><li class="listitem"><p>management/common + </p></li></ul></div><p> + management/client + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>common + </p></li><li class="listitem"><p>client + </p></li></ul></div><p> + integrationtests + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>systests + </p></li><li class="listitem"><p>client + </p></li><li class="listitem"><p>common + </p></li><li class="listitem"><p>junit-toolkit + </p></li></ul></div><p> + testkit + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>client + </p></li><li class="listitem"><p>broker + </p></li><li class="listitem"><p>common + </p></li></ul></div><p> + tools + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>client + </p></li><li class="listitem"><p>common + </p></li></ul></div><p> + client/examples + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>common + </p></li><li class="listitem"><p>client + </p></li></ul></div><p> + broker-plugins + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>client + </p></li><li class="listitem"><p>management/common + </p></li><li class="listitem"><p>broker + </p></li><li class="listitem"><p>common + </p></li><li class="listitem"><p>junit-toolkit + </p></li></ul></div> +</div> +</div> + + <div class="section" title="2.9.2.4. What next ?"><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 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></body></html> --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
