summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-03-02 01:02:30 +0000
committerTed Ross <tross@apache.org>2010-03-02 01:02:30 +0000
commit4133cb8e05f8ea6bac29e1e5cf81afaa3d3a591a (patch)
treea273321c7d84e75c7f95fe271106fb81090bb173
parent10e6d0d251e8da42ab3e401dc75b0661bcee301e (diff)
downloadqpid-python-4133cb8e05f8ea6bac29e1e5cf81afaa3d3a591a.tar.gz
Rebased the qmf-devel branch to the trunk
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qmf-devel0.7@917828 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/cluster/Connection.cpp20
-rw-r--r--qpid/doc/book/src/ACL.xml27
-rw-r--r--qpid/doc/book/src/AMQP-.NET-Messaging-Client.xml18
-rw-r--r--qpid/doc/book/src/AMQP-C++-Messaging-Client.xml4
-rw-r--r--qpid/doc/book/src/AMQP-Compatibility.xml4
-rw-r--r--qpid/doc/book/src/AMQP-Java-JMS-Messaging-Client.xml13
-rw-r--r--qpid/doc/book/src/AMQP-Messaging-Broker-CPP.xml24
-rw-r--r--qpid/doc/book/src/AMQP-Messaging-Broker-Java.xml41
-rw-r--r--qpid/doc/book/src/AMQP-Python-Messaging-Client.xml4
-rw-r--r--qpid/doc/book/src/AMQP-Ruby-Messaging-Client.xml4
-rw-r--r--qpid/doc/book/src/AMQP.xml27
-rw-r--r--qpid/doc/book/src/Add-New-Users.xml18
-rw-r--r--qpid/doc/book/src/Binding-URL-Format.xml8
-rw-r--r--qpid/doc/book/src/Book-Info.xml24
-rw-r--r--qpid/doc/book/src/Book.xml35
-rw-r--r--qpid/doc/book/src/Brokers.xml19
-rw-r--r--qpid/doc/book/src/Cheat-Sheet-for-configuring-Exchange-Options.xml17
-rw-r--r--qpid/doc/book/src/Cheat-Sheet-for-configuring-Queue-Options.xml11
-rw-r--r--qpid/doc/book/src/Configure-ACLs.xml11
-rw-r--r--qpid/doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml7
-rw-r--r--qpid/doc/book/src/Configure-Log4j-CompositeRolling-Appender.xml7
-rw-r--r--qpid/doc/book/src/Configure-the-Broker-via-config.xml.xml10
-rw-r--r--qpid/doc/book/src/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml7
-rw-r--r--qpid/doc/book/src/Configuring-Management-Users.xml9
-rw-r--r--qpid/doc/book/src/Configuring-Qpid-JMX-Management-Console.xml19
-rw-r--r--qpid/doc/book/src/Connection-URL-Format.xml7
-rw-r--r--qpid/doc/book/src/Debug-using-log4j.xml9
-rw-r--r--qpid/doc/book/src/Download.xml84
-rw-r--r--qpid/doc/book/src/Excel-AddIn.xml8
-rw-r--r--qpid/doc/book/src/Getting-Started.xml62
-rw-r--r--qpid/doc/book/src/How-to-Tune-M3-Java-Broker-Performance.xml8
-rw-r--r--qpid/doc/book/src/How-to-Use-JNDI.xml8
-rw-r--r--qpid/doc/book/src/Introduction.xml23
-rw-r--r--qpid/doc/book/src/Java-Broker-Feature-Guide.xml6
-rw-r--r--qpid/doc/book/src/Java-Environment-Variables.xml6
-rw-r--r--qpid/doc/book/src/LVQ.xml27
-rw-r--r--qpid/doc/book/src/Management-Console-Security.xml16
-rw-r--r--qpid/doc/book/src/Management-Design-notes.xml10
-rw-r--r--qpid/doc/book/src/Managing-CPP-Broker.xml (renamed from qpid/doc/book/src/82403.xml)11
-rw-r--r--qpid/doc/book/src/MessageStore-Tool.xml8
-rw-r--r--qpid/doc/book/src/NET-User-Guide.xml6
-rw-r--r--qpid/doc/book/src/PythonBrokerTest.xml6
-rw-r--r--qpid/doc/book/src/QMF-Python-Console-Tutorial.xml8
-rw-r--r--qpid/doc/book/src/QMan-Qpid-Management-bridge.xml20
-rw-r--r--qpid/doc/book/src/Qpid-ACLs.xml2
-rw-r--r--qpid/doc/book/src/Qpid-Interoperability-Documentation.xml12
-rw-r--r--qpid/doc/book/src/Qpid-JMX-Management-Console-FAQ.xml8
-rw-r--r--qpid/doc/book/src/Qpid-JMX-Management-Console-User-Guide.xml9
-rw-r--r--qpid/doc/book/src/Qpid-JMX-Management-Console.xml16
-rw-r--r--qpid/doc/book/src/Qpid-Java-Broker-Management-CLI.xml6
-rw-r--r--qpid/doc/book/src/Qpid-Java-Build-How-To.xml8
-rw-r--r--qpid/doc/book/src/Qpid-Java-FAQ.xml57
-rw-r--r--qpid/doc/book/src/Qpid-Management-Features.xml13
-rw-r--r--qpid/doc/book/src/Qpid-Management-Framework.xml14
-rw-r--r--qpid/doc/book/src/Qpid-Troubleshooting-Guide.xml8
-rw-r--r--qpid/doc/book/src/Running-CPP-Broker.xml (renamed from qpid/doc/book/src/RASC.xml)23
-rw-r--r--qpid/doc/book/src/SSL.xml6
-rw-r--r--qpid/doc/book/src/Starting-a-cluster.xml6
-rw-r--r--qpid/doc/book/src/System-Properties.xml8
-rw-r--r--qpid/doc/book/src/Use-Priority-Queues.xml8
-rw-r--r--qpid/doc/book/src/Using-Broker-Federation.xml14
-rw-r--r--qpid/doc/book/src/Using-Qpid-with-other-JNDI-Providers.xml4
-rw-r--r--qpid/doc/book/src/WCF.xml6
-rw-r--r--qpid/doc/book/src/queue-state-replication.xml6
-rw-r--r--qpid/doc/book/src/schemas.xml6
-rw-r--r--qpid/extras/qmf/src/py/qmf2/agent.py330
-rw-r--r--qpid/extras/qmf/src/py/qmf2/common.py242
-rw-r--r--qpid/extras/qmf/src/py/qmf2/console.py284
-rw-r--r--qpid/extras/qmf/src/py/qmf2/tests/subscriptions.py334
-rwxr-xr-xqpid/tests/setup.py31
-rwxr-xr-xqpid/tools/src/py/qpid-stat55
71 files changed, 1288 insertions, 949 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Connection.cpp b/qpid/cpp/src/qpid/cluster/Connection.cpp
index a375a65851..909ff68d92 100644
--- a/qpid/cpp/src/qpid/cluster/Connection.cpp
+++ b/qpid/cpp/src/qpid/cluster/Connection.cpp
@@ -159,6 +159,11 @@ bool Connection::doOutput() {
// Received from a directly connected client.
void Connection::received(framing::AMQFrame& f) {
+ if (!connection.get()) {
+ QPID_LOG(warning, cluster << " ignoring frame on closed connection "
+ << *this << ": " << f);
+ return;
+ }
QPID_LOG(trace, cluster << " RECV " << *this << ": " << f);
if (isLocal()) { // Local catch-up connection.
currentChannel = f.getChannel();
@@ -231,7 +236,7 @@ void Connection::closed() {
}
else if (isUpdated()) {
QPID_LOG(debug, cluster << " closed update connection " << *this);
- connection->closed();
+ if (connection.get()) connection->closed();
}
else if (isLocal()) {
QPID_LOG(debug, cluster << " local close of replicated connection " << *this);
@@ -250,13 +255,21 @@ void Connection::closed() {
// Self-delivery of close message, close the connection.
void Connection::deliverClose () {
assert(!catchUp);
- connection->closed();
+ if (connection.get()) {
+ connection->closed();
+ // Ensure we delete the broker::Connection in the deliver thread.
+ connection.reset();
+ }
cluster.erase(self);
}
// The connection has been killed for misbehaving
void Connection::abort() {
- if (connection.get()) connection->abort();
+ if (connection.get()) {
+ connection->abort();
+ // Ensure we delete the broker::Connection in the deliver thread.
+ connection.reset();
+ }
cluster.erase(self);
}
@@ -324,7 +337,6 @@ void Connection::sessionState(
const SequenceSet& unknownCompleted,
const SequenceSet& receivedIncomplete)
{
-
sessionState().setState(
replayStart,
sendCommandPoint,
diff --git a/qpid/doc/book/src/ACL.xml b/qpid/doc/book/src/ACL.xml
index 123819b490..71cf328ed2 100644
--- a/qpid/doc/book/src/ACL.xml
+++ b/qpid/doc/book/src/ACL.xml
@@ -20,17 +20,20 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : ACL
- </title><section role="h2" id="ACL-v2ACLfileformatforbrokers"><title>
- v2 ACL file format
- for brokers
- </title>
- <para>
- This new ACL implementation has been designed for implementation
- and interoperability on all Qpid brokers. It is currently
- supported in the following brokers:
- </para>
+<section id="qpid_ACL">
+ <title>
+ ACL
+ </title>
+
+ <section role="h2" id="ACL-v2ACLfileformatforbrokers">
+ <title>
+ v2 ACL file format for brokers
+ </title>
+ <para>
+ This new ACL implementation has been designed for implementation
+ and interoperability on all Qpid brokers. It is currently
+ supported in the following brokers:
+ </para>
<table><title/><tgroup cols="2">
<thead>
@@ -789,4 +792,4 @@ ACL Options:
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/AMQP-.NET-Messaging-Client.xml b/qpid/doc/book/src/AMQP-.NET-Messaging-Client.xml
index d4ea48e8ee..1d4001942b 100644
--- a/qpid/doc/book/src/AMQP-.NET-Messaging-Client.xml
+++ b/qpid/doc/book/src/AMQP-.NET-Messaging-Client.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+<chapter>
<title>
- Apache Qpid : AMQP .NET Messaging Client
+ AMQP .NET Messaging Client
</title>
<para>
Currently the .NET code base provides two client libraries that
@@ -40,9 +40,9 @@
User Guides
</title>
- <xi:include href="NET%20User%20Guide.xml"/>
- <xi:include href="Excel%20AddIn.xml"/>
- <xi:include href="WCF.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="NET-User-Guide.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Excel-AddIn.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="WCF.xml"/>
</section>
<section role="h3" id="AMQP.NETMessagingClient-Examples">
@@ -68,7 +68,7 @@
<itemizedlist>
<listitem>
<para>
- <xref linkend="qpid_Developer-20Pages"/>
+ <xref linkend="qpid_Developer-Pages"/>
</para>
</listitem>
<listitem>
@@ -79,7 +79,7 @@
<itemizedlist>
<listitem>
<para>
- <xref linkend="qpid_Build-20.NET-20Client"/>
+ <xref linkend="qpid_Build-.NET-Client"/>
</para>
</listitem>
<listitem>
@@ -89,12 +89,12 @@
</listitem>
<listitem>
<para>
- <xref linkend="qpid_Run-20tests"/>
+ <xref linkend="qpid_Run-tests"/>
</para>
</listitem>
<listitem>
<para>
- <xref linkend="qpid_Setup-20.Net-20Client-20on-20Windows"/>
+ <xref linkend="qpid_Setup-.Net-Client-on-Windows"/>
</para>
</listitem>
</itemizedlist>
diff --git a/qpid/doc/book/src/AMQP-C++-Messaging-Client.xml b/qpid/doc/book/src/AMQP-C++-Messaging-Client.xml
index ff21c42b51..73a2cd6c0b 100644
--- a/qpid/doc/book/src/AMQP-C++-Messaging-Client.xml
+++ b/qpid/doc/book/src/AMQP-C++-Messaging-Client.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<chapter >
<title>
- Apache Qpid : AMQP C++ Messaging Client
+ AMQP C++ Messaging Client
</title>
<section role="h3" id="AMQPCPPMessagingClient-UserGuides">
<title>
diff --git a/qpid/doc/book/src/AMQP-Compatibility.xml b/qpid/doc/book/src/AMQP-Compatibility.xml
index 867d027d56..da776ec458 100644
--- a/qpid/doc/book/src/AMQP-Compatibility.xml
+++ b/qpid/doc/book/src/AMQP-Compatibility.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml" id="AMQP-Compatibility">
+<chapter id="AMQP-Compatibility">
<title>
- Apache Qpid : AMQP compatibility
+ AMQP compatibility
</title>
<para>
Qpid provides the most complete and compatible implementation
diff --git a/qpid/doc/book/src/AMQP-Java-JMS-Messaging-Client.xml b/qpid/doc/book/src/AMQP-Java-JMS-Messaging-Client.xml
index 2ac1964793..089e17c7f0 100644
--- a/qpid/doc/book/src/AMQP-Java-JMS-Messaging-Client.xml
+++ b/qpid/doc/book/src/AMQP-Java-JMS-Messaging-Client.xml
@@ -20,10 +20,10 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<chapter>
<title>
- Apache Qpid : AMQP Java JMS Messaging Client
+ AMQP Java JMS Messaging Client
</title>
<para>The Java Client supported by Qpid implements the <ulink
@@ -42,13 +42,12 @@ Does not seem to exist!
<listitem><para>AMQP Java JMS Client Feature Guide
</para></listitem>
-http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=qpid&title=JMS%20Client%20Feature%20Guide&linkCreation=true&fromPageId=4589057
+http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=qpid&title=JMS-Client-Feature-Guide&linkCreation=true&fromPageId=4589057
-->
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20FAQ.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="System%20Properties.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Connection%20URL%20Format.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Binding%20URL%20Format.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="System-Properties.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Connection-URL-Format.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Binding-URL-Format.xml"/>
<!--
<listitem><para>How to Use JNDI to configure the AMQP Java JMS Client
diff --git a/qpid/doc/book/src/AMQP-Messaging-Broker-CPP.xml b/qpid/doc/book/src/AMQP-Messaging-Broker-CPP.xml
index 0373583af4..b9c513e511 100644
--- a/qpid/doc/book/src/AMQP-Messaging-Broker-CPP.xml
+++ b/qpid/doc/book/src/AMQP-Messaging-Broker-CPP.xml
@@ -40,29 +40,29 @@
Running the AMQP Messaging Broker
</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="RASC.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Cheat%20Sheet%20for%20configuring%20Queue%20Options.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Cheat%20Sheet%20for%20configuring%20Exchange%20Options.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Running-CPP-Broker.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Cheat-Sheet-for-configuring-Queue-Options.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Cheat-Sheet-for-configuring-Exchange-Options.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using%20Broker%20Federation.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using-Broker-Federation.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="SSL.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="LVQ.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="queue%20state%20replication.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Starting%20a%20cluster.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="queue-state-replication.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Starting-a-cluster.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ACL.xml"/>
</chapter>
-<chapter>
+<chapter id="chapter-Managing-CPP-Broker">
<title>
Managing the AMQP Messaging Broker
</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="82403.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="QMan%20-%20Qpid%20Management%20bridge.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Management%20Framework.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Management%20Design%20notes.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="QMF%20Python%20Console%20Tutorial.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Managing-CPP-Broker.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="QMan-Qpid-Management-bridge.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Management-Framework.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Management-Design-notes.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="QMF-Python-Console-Tutorial.xml"/>
</chapter>
</part>
diff --git a/qpid/doc/book/src/AMQP-Messaging-Broker-Java.xml b/qpid/doc/book/src/AMQP-Messaging-Broker-Java.xml
index 99928fe22e..14fe977670 100644
--- a/qpid/doc/book/src/AMQP-Messaging-Broker-Java.xml
+++ b/qpid/doc/book/src/AMQP-Messaging-Broker-Java.xml
@@ -38,34 +38,33 @@
<chapter>
<title>General User Guides</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java%20Broker%20Feature%20Guide.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20FAQ.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java%20Environment%20Variables.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Troubleshooting%20Guide.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java-Broker-Feature-Guide.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Java-FAQ.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java-Environment-Variables.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Troubleshooting-Guide.xml"/>
</chapter>
-<chapter id="AMQPMessagingBroker%28implementedinJava%29-HowTos">
+<chapter id="Qpid-Java-Broker-HowTos">
<title>How Tos</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Add%20New%20Users.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20ACLs.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20Java%20Qpid%20to%20use%20a%20SSL%20connection..xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20Log4j%20CompositeRolling%20Appender.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20the%20Broker%20via%20config.xml.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20the%20Virtual%20Hosts%20via%20virtualhosts.xml.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Debug%20using%20log4j.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="How%20to%20Tune%20M3%20Java%20Broker%20Performance.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20Build%20How%20To.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Use%20Priority%20Queues.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Add-New-Users.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-ACLs.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-Java-Qpid-to-use-a-SSL-connection.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-Log4j-CompositeRolling-Appender.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-the-Broker-via-config.xml.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Debug-using-log4j.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="How-to-Tune-M3-Java-Broker-Performance.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Java-Build-How-To.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Use-Priority-Queues.xml"/>
</chapter>
-<chapter id="AMQPMessagingBroker%28implementedinJava%29-ManagementTools">
-<title>Management Tools</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20JMX%20Management%20Console.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="MessageStore%20Tool.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20Broker%20Management%20CLI.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Management%20Design%20notes.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-JMX-Management-Console.xml"/>
+<chapter id="QpidJavaBroker-ManagementTools">
+<title>Management Tools</title>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="MessageStore-Tool.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Java-Broker-Management-CLI.xml"/>
</chapter>
</part>
diff --git a/qpid/doc/book/src/AMQP-Python-Messaging-Client.xml b/qpid/doc/book/src/AMQP-Python-Messaging-Client.xml
index 4ccfeb3a3f..15baf214ec 100644
--- a/qpid/doc/book/src/AMQP-Python-Messaging-Client.xml
+++ b/qpid/doc/book/src/AMQP-Python-Messaging-Client.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<chapter>
<title>
- Apache Qpid : AMQP Python Messaging Client
+ AMQP Python Messaging Client
</title>
<section role="h3" id="AMQPPythonMessagingClient-UserGuides">
<title>
diff --git a/qpid/doc/book/src/AMQP-Ruby-Messaging-Client.xml b/qpid/doc/book/src/AMQP-Ruby-Messaging-Client.xml
index 6b8344197a..45318c0beb 100644
--- a/qpid/doc/book/src/AMQP-Ruby-Messaging-Client.xml
+++ b/qpid/doc/book/src/AMQP-Ruby-Messaging-Client.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<chapter>
<title>
- Apache Qpid : AMQP Ruby Messaging Client
+ AMQP Ruby Messaging Client
</title>
<para>
The Ruby Messaging Client currently has little documentation and
diff --git a/qpid/doc/book/src/AMQP.xml b/qpid/doc/book/src/AMQP.xml
index 8633699db4..1a609649bb 100644
--- a/qpid/doc/book/src/AMQP.xml
+++ b/qpid/doc/book/src/AMQP.xml
@@ -1,4 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+
<chapter>
+
<title>AMQP (Advanced Message Queueing Protocol</title>
@@ -25,9 +48,9 @@ support and a lot more.</para>
<title>AMQP version 0-10</title>
<listitem><para><ulink url="https://jira.amqp.org/confluence/download/attachments/720900/amqp.0-10.pdf?version=1"
>AMQP 0-10 Specification (PDF)</ulink></para></listitem>
-<listitem><para><ulink> url="https://jira.amqp.org/confluence/download/attachments/720900/amqp.0-10.xml?version=1"
+<listitem><para><ulink url="https://jira.amqp.org/confluence/download/attachments/720900/amqp.0-10.xml?version=1"
>AMQP 0-10 Protocol Definition XML</ulink></para></listitem>
-<listitem><para><ulink> url="https://jira.amqp.org/confluence/download/attachments/720900/amqp.0-10.dfd?version=1"
+<listitem><para><ulink url="https://jira.amqp.org/confluence/download/attachments/720900/amqp.0-10.dfd?version=1"
>AMQP 0-10 Protocol Definition DTD</ulink></para></listitem>
</itemizedlist>
diff --git a/qpid/doc/book/src/Add-New-Users.xml b/qpid/doc/book/src/Add-New-Users.xml
index 31e4495488..24f8877c2e 100644
--- a/qpid/doc/book/src/Add-New-Users.xml
+++ b/qpid/doc/book/src/Add-New-Users.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Add New Users
+<section><title>
+ Add New Users
</title><para>
The Qpid Java Broker has a single reference source (<xref linkend="qpid_PrincipalDatabase"/>) that
defines all the users in the system.
@@ -43,10 +43,10 @@
use they only need support the SASL mechanisms they provide.
</para><itemizedlist>
<listitem><para>
- <xref linkend="AddNewUsers-plain"/>
+ <xref linkend="AddNewUsers-Plain"/>
</para></listitem>
<listitem><para>
- <xref linkend="AddNewUsers-base64md5"/>
+ <xref linkend="AddNewUsers-Base64MD5PasswordFileFormat"/>
</para></listitem>
</itemizedlist><para>
@@ -156,11 +156,11 @@ martin:X03MO1qnZdYdgyfeuILPmQ==
for qpid passwd files.
<emphasis>NOTE:</emphasis> For the changes to be seen by the broker you must
either restart the broker or reload the data with the
- management tools (see <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/>)
+ management tools (see <xref linkend="Qpid-JMX-Management-Console-User-Guide"/>)
</para></listitem>
<listitem><para>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 <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/>).
+ will be immediately available to the system (see <xref linkend="Qpid-JMX-Management-Console-User-Guide"/>).
</para></listitem>
</orderedlist>
<!--h3--></section>
@@ -176,7 +176,7 @@ martin:X03MO1qnZdYdgyfeuILPmQ==
only read once on start up.
</para><para>
To make changes dynamically there are two options, both require
- administrator access via the Management Console (see <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/>)
+ administrator access via the Management Console (see <xref linkend="Qpid-JMX-Management-Console-User-Guide"/>)
</para><orderedlist>
<listitem><para>You can replace the file and use the console to reload its
contents.
@@ -229,8 +229,8 @@ martin:X03MO1qnZdYdgyfeuILPmQ==
</row>
</tbody>
</tgroup></table><para>
- For details of SASL support see <xref linkend="qpid_Qpid-20Interoperability-20Documentation"/>
+ For details of SASL support see <xref linkend="qpid_Qpid-Interoperability-Documentation"/>
</para>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Binding-URL-Format.xml b/qpid/doc/book/src/Binding-URL-Format.xml
index 65d619b470..efce79edd2 100644
--- a/qpid/doc/book/src/Binding-URL-Format.xml
+++ b/qpid/doc/book/src/Binding-URL-Format.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,8 +21,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : BindingURLFormat
+<section id="BindingURLFormat">
+ <title>
+ Binding URL Format
</title>
<programlisting>
&lt;Exchange Class&gt;://&lt;Exchange Name&gt;/[&lt;Destination&gt;]/[&lt;Queue&gt;][?&lt;option&gt;='&lt;value&gt;'[&amp;&lt;option&gt;='&lt;value&gt;']]
@@ -169,4 +171,4 @@ topic://amq.topic?routingkey='stocks.nyse.ibm'
</programlisting>
</example>
<!--h4--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Book-Info.xml b/qpid/doc/book/src/Book-Info.xml
index f8f7516917..2e02fbe8ea 100644
--- a/qpid/doc/book/src/Book-Info.xml
+++ b/qpid/doc/book/src/Book-Info.xml
@@ -1,4 +1,26 @@
<?xml version='1.0' encoding='utf-8' ?>
+
+<!--
+
+ 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.
+
+-->
+
<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
@@ -41,8 +63,6 @@
</legalnotice>
-
-
</bookinfo>
diff --git a/qpid/doc/book/src/Book.xml b/qpid/doc/book/src/Book.xml
index 175814cb26..ee69532152 100644
--- a/qpid/doc/book/src/Book.xml
+++ b/qpid/doc/book/src/Book.xml
@@ -1,4 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,39 +21,39 @@
-->
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
-<book xmlns:xi="http://www.w3.org/2001/XInclude">
- <xi:include href="Book_Info.xml"/>
+<book>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book-Info.xml"/>
<part>
<title>Basics</title>
- <xi:include href="Introduction.xml"/>
- <xi:include href="AMQP.xml"/>
- <xi:include href="Getting_Started.xml"/>
- <xi:include href="Download.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Introduction.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Getting-Started.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Download.xml"/>
</part>
<!--
The broker sections define their own <part/> elements, with <partintro/> text.
-->
- <xi:include href="AMQP-Messaging-Broker-CPP.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="AMQP-Messaging-Broker-Java.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-Messaging-Broker-CPP.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-Messaging-Broker-Java.xml"/>
<part>
<title>AMQP Messaging Clients Clients</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP%20Java%20JMS%20Messaging%20Client.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP%20C++%20Messaging%20Client.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP%20.NET%20Messaging%20Client.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP%20Python%20Messaging%20Client.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP%20Ruby%20Messaging%20Client.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-Java-JMS-Messaging-Client.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-C++-Messaging-Client.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-.NET-Messaging-Client.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-Python-Messaging-Client.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-Ruby-Messaging-Client.xml"/>
</part>
<part>
<title>Appendices</title>
- <xi:include href="AMQP%20Compatibility.xml"/>
- <xi:include href="Qpid%20Interoperability%20Documentation.xml"/>
-<!-- <xi:include href="FAQ.xml"/> -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-Compatibility.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Interoperability-Documentation.xml"/>
+<!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="FAQ.xml"/> -->
</part>
</book>
diff --git a/qpid/doc/book/src/Brokers.xml b/qpid/doc/book/src/Brokers.xml
deleted file mode 100644
index 52fd449464..0000000000
--- a/qpid/doc/book/src/Brokers.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<part>
- <title>AMQP Messaging Brokers</title>
-
- <partintro>
- <para>Qpid provides two AMQP messaging brokers:</para>
-
- <itemizedlist>
- <listitem><para>Implemented in C++ - high performance, low latency, and RDMA support.</para></listitem>
- <listitem><para>Implemented in Java - Fully JMS compliant, runs on any Java platform.</para></listitem>
- </itemizedlist>
-
- <para>Both AMQP messaging brokers support clients in multiple languages, as long as the messaging client and the messaging broker use the same version of AMQP. See <link linkend="AMQP-Compatibility"/> to see which messaging clients work with each broker.</para>
- </partintro>
-
- <xi:include href="AMQP-Messaging-Broker-CPP.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
- <xi:include href="AMQP-Messaging-Broker-Java.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
-</part>
diff --git a/qpid/doc/book/src/Cheat-Sheet-for-configuring-Exchange-Options.xml b/qpid/doc/book/src/Cheat-Sheet-for-configuring-Exchange-Options.xml
index 777fb05e09..fccdae1b9a 100644
--- a/qpid/doc/book/src/Cheat-Sheet-for-configuring-Exchange-Options.xml
+++ b/qpid/doc/book/src/Cheat-Sheet-for-configuring-Exchange-Options.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +21,15 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Cheat Sheet for configuring Exchange Options
- </title><section role="h2" id="CheatSheetforconfiguringExchangeOptions-ConfiguringExchangeOptions"><title>
- Configuring Exchange Options
- </title>
+<section>
+ <title>
+ Cheat Sheet for configuring Exchange Options
+ </title>
+
+ <section role="h2" id="CheatSheetforconfiguringExchangeOptions-ConfiguringExchangeOptions">
+ <title>
+ Configuring Exchange Options
+ </title>
<para>
The C++ Broker M4 or later supports the following additional
Exchange options in addition to the standard AMQP define options
@@ -136,4 +141,4 @@
</programlisting>
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Cheat-Sheet-for-configuring-Queue-Options.xml b/qpid/doc/book/src/Cheat-Sheet-for-configuring-Queue-Options.xml
index 6b5a89ca05..f0e94cca74 100644
--- a/qpid/doc/book/src/Cheat-Sheet-for-configuring-Queue-Options.xml
+++ b/qpid/doc/book/src/Cheat-Sheet-for-configuring-Queue-Options.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,8 +21,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Cheat Sheet for configuring Queue Options
+<section><title>
+ Cheat Sheet for configuring Queue Options
</title>
<section role="h2" id="CheatSheetforconfiguringQueueOptions-ConfiguringQueueOptions"><title>
@@ -165,7 +166,7 @@
ignored.
</para></listitem>
</itemizedlist><para>
- A fully worked <xref linkend="qpid_LVQ-20Example"/> can be found here
+ A fully worked <xref linkend="qpid_LVQ-Example"/> can be found here
</para>
<!--h3--></section>
<section role="h3" id="CheatSheetforconfiguringQueueOptions-Settingadditionalbehaviors"><title>
@@ -210,7 +211,7 @@
This option is used to determine whether enqueue/dequeue events
representing changes made to queue state are generated. These
events can then be processed by plugins such as that used for
- <xref linkend="qpid_queue-20state-20replication"/>.
+ <xref linkend="qpid_queue-state-replication"/>.
</para><para>
Example:
</para>
@@ -245,4 +246,4 @@
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Configure-ACLs.xml b/qpid/doc/book/src/Configure-ACLs.xml
index 086c323d80..ec3aaa8465 100644
--- a/qpid/doc/book/src/Configure-ACLs.xml
+++ b/qpid/doc/book/src/Configure-ACLs.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,9 +21,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : Configure ACLs
+ Configure ACLs
</title>
<section role="h2" id="ConfigureACLs-ConfigureACLs">
<title>
@@ -34,7 +35,7 @@
</title>
<itemizedlist>
<listitem><para>
- <xref linkend="qpid_Java-20XML-20ACLs"/>
+ <xref linkend="qpid_Java-XML-ACLs"/>
</para></listitem>
<listitem><para>
<xref linkend="qpid_ACL"/>
@@ -62,7 +63,7 @@
<itemizedlist>
<listitem><para>
- <xref linkend="qpid_Java-20XML-20ACLs"/>
+ <xref linkend="qpid_Java-XML-ACLs"/>
</para></listitem>
<listitem><para>Support for Version 2 specification is in progress.
</para></listitem>
@@ -74,4 +75,4 @@
<!--h2-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml b/qpid/doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml
index b790b09f16..c09923711d 100644
--- a/qpid/doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml
+++ b/qpid/doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,8 +21,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Configure Java Qpid to use a SSL connection.
+<section><title>
+ Configure Java Qpid to use a SSL connection.
</title>
<section role="h2" id="ConfigureJavaQpidtouseaSSLconnection.-UsingSSLconnectionwithQpidJava."><title>
@@ -80,4 +81,4 @@
</title>
<para/>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Configure-Log4j-CompositeRolling-Appender.xml b/qpid/doc/book/src/Configure-Log4j-CompositeRolling-Appender.xml
index d8dc88bb76..2c21f9e76d 100644
--- a/qpid/doc/book/src/Configure-Log4j-CompositeRolling-Appender.xml
+++ b/qpid/doc/book/src/Configure-Log4j-CompositeRolling-Appender.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,8 +21,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Configure Log4j CompositeRolling Appender
+<section><title>
+ Configure Log4j CompositeRolling Appender
</title>
<section role="h2" id="ConfigureLog4jCompositeRollingAppender-HowtoconfiguretheCompositeRollinglog4jAppender"><title>
How to configure the CompositeRolling log4j Appender
@@ -146,4 +147,4 @@
</listitem>
</orderedlist>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Configure-the-Broker-via-config.xml.xml b/qpid/doc/book/src/Configure-the-Broker-via-config.xml.xml
index ac1f1d1fc6..b91e0796b8 100644
--- a/qpid/doc/book/src/Configure-the-Broker-via-config.xml.xml
+++ b/qpid/doc/book/src/Configure-the-Broker-via-config.xml.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,14 +21,13 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : Configure the Broker via config.xml
+ Configure the Broker via config.xml
</title>
<section role="h2" id="ConfiguretheBrokerviaconfig.xml-Brokerconfig.xmlOverview">
<title>
- Broker
- config.xml Overview
+ Broker config.xml Overview
</title>
<para>
The broker config.xml file which is shipped in the etc directory
@@ -68,4 +68,4 @@
<!--h2-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml b/qpid/doc/book/src/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml
index 9e54e39c85..690175d57e 100644
--- a/qpid/doc/book/src/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml
+++ b/qpid/doc/book/src/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,8 +21,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Configure the Virtual Hosts via virtualhosts.xml
+<section><title>
+ Configure the Virtual Hosts via virtualhosts.xml
</title><section role="h2" id="ConfiguretheVirtualHostsviavirtualhosts.xml-virtualhosts.xmlOverview"><title>
virtualhosts.xml Overview
</title>
@@ -127,4 +128,4 @@
</para>
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Configuring-Management-Users.xml b/qpid/doc/book/src/Configuring-Management-Users.xml
index e473a047b5..a2a8d46d88 100644
--- a/qpid/doc/book/src/Configuring-Management-Users.xml
+++ b/qpid/doc/book/src/Configuring-Management-Users.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,8 +21,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Configuring Management Users
+<section><title>
+ Configuring Management Users
</title><para>
The Qpid Java broker has a single source of users for the system.
So a user can connect to the broker to send messages and via the
@@ -42,7 +43,7 @@
There are two steps required to add a new user with rights for
the JMX console.
</para><orderedlist>
- <listitem><para>Create a new user login, see HowTo:<xref linkend="qpid_Add-20New-20Users"/>
+ <listitem><para>Create a new user login, see HowTo:<xref linkend="qpid_Add-New-Users"/>
</para></listitem>
<listitem><para>Grant the new user permission to the JMX Console
</para></listitem>
@@ -113,4 +114,4 @@ user=readwrite
<!--h4--></section>
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Configuring-Qpid-JMX-Management-Console.xml b/qpid/doc/book/src/Configuring-Qpid-JMX-Management-Console.xml
index 1bc5e1138e..72e4ba8969 100644
--- a/qpid/doc/book/src/Configuring-Qpid-JMX-Management-Console.xml
+++ b/qpid/doc/book/src/Configuring-Qpid-JMX-Management-Console.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,8 +21,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Configuring Qpid JMX Management Console
+<section><title>
+ Configuring Qpid JMX Management Console
</title><section role="h2" id="ConfiguringQpidJMXManagementConsole-ConfiguringQpidJMXManagementConsole"><title>
Configuring Qpid JMX Management Console
</title>
@@ -30,7 +31,7 @@
Qpid has a JMX management interface that exposes a number of
components of the running broker.
You can find out more about the features exposed by the JMX
- interfaces <xref linkend="qpid_Qpid-20Management-20Features"/>.
+ interfaces <xref linkend="qpid_Qpid-Management-Features"/>.
</para><para>
</para>
@@ -49,7 +50,7 @@
being connected to is making use of this ability then
additional console configuration may be required,
particularly when using self-signed certificates. See
- <xref linkend="qpid_Management-20Console-20Security"/> for details.
+ <xref linkend="qpid_Management-Console-Security"/> for details.
</para>
</note>
</listitem>
@@ -66,7 +67,7 @@
However, if you wish to connect to an older broker using
JMXMP the console will support this so long as the
<emphasis>jmxremote_optional.jar</emphasis> file is provided to it.
- For details see <xref linkend="qpid_Management-20Console-20Security"/>.
+ For details see <xref linkend="qpid_Management-Console-Security"/>.
</para>
</note>
<!--h3--></section>
@@ -98,7 +99,7 @@
</title>
<para>
- Please see <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/> for details on using this Eclipse RCP
+ Please see <xref linkend="Qpid-JMX-Management-Console-User-Guide"/> for details on using this Eclipse RCP
application.
</para>
@@ -124,7 +125,7 @@
<para>
HermesJMS also offers integration with the Qpid management
interfaces. You can get instructions and more information from
- <xref linkend="qpid_HermesJMS"/>.
+ <ulink url="http://cwiki.apache.org/confluence/display/qpid/HermesJMS">HermesJMS</ulink>.
</para>
<!--h2--></section>
@@ -134,7 +135,7 @@
</title>
<para>
- <xref linkend="qpid_www.mc4j.org"/> is an alternative
+ <ulink url="qpid_www.mc4j.org">MC4J</ulink> is an alternative
management tool. It provide a richer "dashboard" that can
customise the raw MBeans.
</para>
@@ -177,4 +178,4 @@
</para>
<!--h4--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Connection-URL-Format.xml b/qpid/doc/book/src/Connection-URL-Format.xml
index a50b379ceb..280ec1776a 100644
--- a/qpid/doc/book/src/Connection-URL-Format.xml
+++ b/qpid/doc/book/src/Connection-URL-Format.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,9 +21,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section id="Connection-URL-Format">
<title>
- Apache Qpid : Connection URL Format
+ Connection URL Format
</title>
<section role="h4" id="ConnectionURLFormat-Format">
@@ -378,4 +379,4 @@ amqp://guest:guest@/test?brokerlist='vm://:1'&amp;failover='nofailover'
</programlisting>
<!--h3--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Debug-using-log4j.xml b/qpid/doc/book/src/Debug-using-log4j.xml
index fd49dcd2e4..c4ec107cd0 100644
--- a/qpid/doc/book/src/Debug-using-log4j.xml
+++ b/qpid/doc/book/src/Debug-using-log4j.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -20,8 +21,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Debug using log4j
+<section><title>
+ Debug using log4j
</title>
<section role="h2" id="Debugusinglog4j-Debuggingwithlog4jconfigurations"><title>
@@ -59,7 +60,7 @@
</title>
<para>
<emphasis>deprecation notice</emphasis> Version 0.6 of the Java broker includes
- <xref linkend="qpid_Configure-20Operational-20Status-20Logging"/> functionality which improves upon these messages and
+ <xref linkend="qpid_Configure-Operational-Status-Logging"/> functionality which improves upon these messages and
as such enabling status logging would be more beneficial.
The configuration file has been left here for assistence with
broker versions prior to 0.6.
@@ -294,4 +295,4 @@
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Download.xml b/qpid/doc/book/src/Download.xml
index 86ad4b65d8..6e2352d490 100644
--- a/qpid/doc/book/src/Download.xml
+++ b/qpid/doc/book/src/Download.xml
@@ -1,12 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
<!--
- [ ] <- ###############
-*<ulink>url</ulink>
-*Broker
+
+ 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.
+
-->
-<chapter>
+<chapter id="chapter-Download">
+
<title>Download Apache Qpid</title>
+<para/>
+
+
<section><title>Production Releases</title>
<para>These releases are well tested and appropriate for production use. 0.5 is the latest release of Qpid.</para>
@@ -23,13 +43,17 @@
<section><title>Multiple Component Packages</title>
-<table>
-<thead><tr><td> Component </td><td> Download </td><td> AMQP 0-10 </td><td> AMQP 0-8/0-9 </td></tr></thead>
+<table frame="all">
+<title/>
+<tgroup cols='4' align='left' colsep='1' rowsep='1'>
+<thead><row><entry> Component </entry><entry> Download </entry><entry> AMQP 0-10 </entry><entry> AMQP 0-8/0-9 </entry></row></thead>
<tbody>
-<tr><td> Full release &amp; keys </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/">http://www.apache.org/dist/qpid/0.5/</ulink> </td><td> Y </td><td> Y </td></tr>
-<tr><td> C++ broker &amp; client </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz</ulink> </td><td> Y </td><td> </td></tr>
-<tr><td> Java broker, client &amp; tools </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz</ulink> </td><td> client </td><td> Y </td></tr>
-</tbody></table>
+<row><entry> Full release &amp; keys </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/">http://www.apache.org/dist/qpid/0.5/</ulink> </entry><entry> Y </entry><entry> Y </entry></row>
+<row><entry> C++ broker &amp; client </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz</ulink> </entry><entry> Y </entry><entry> </entry></row>
+<row><entry> Java broker, client &amp; tools </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz</ulink> </entry><entry> client </entry><entry> Y </entry></row>
+</tbody>
+</tgroup>
+</table>
</section>
<section><title>Single Component Package</title>
@@ -37,53 +61,61 @@
<table>
<title>Broker</title>
-<thead><tr><td> Language </td><td> Download </td><td> AMQP 0-10 </td><td> AMQP 0-8/0-9 </td></tr></thead>
+<tgroup cols="4" align='left' colsep='1' rowsep='1'>
+<thead><row><entry> Language </entry><entry> Download </entry><entry> AMQP 0-10 </entry><entry> AMQP 0-8/0-9 </entry></row></thead>
<tbody>
-<tr><td> Java </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-java-broker-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-java-broker-0.5.tar.gz</ulink> </td><td> </td><td> Y </td></tr>
+<row><entry> Java </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-java-broker-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-java-broker-0.5.tar.gz</ulink> </entry><entry> </entry><entry> Y </entry></row>
</tbody>
+</tgroup>
</table>
<table>
<title>Client</title>
-<thead><tr><td> Language </td><td> Download </td><td> AMQP 0-10 </td><td> AMQP 0-8/0-9 </td></tr></thead>
+<tgroup cols="4" align='left' colsep='1' rowsep='1'>
+<thead><row><entry> Language </entry><entry> Download </entry><entry> AMQP 0-10 </entry><entry> AMQP 0-8/0-9 </entry></row></thead>
<tbody>
-<tr><td> C# (.NET, WCF, Excel) 0-10 client (C++ Broker Compatible) </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-10-0.5.zip">http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-10-0.5.zip</ulink> </td><td> Y </td><td> </td></tr>
-<tr><td> C# (.NET) 0-8 client (Java Broker Compatible) </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-8-0.5.zip">http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-8-0.5.zip</ulink> </td><td> </td><td> Y </td></tr>
-<tr><td> Java </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-java-client-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-java-client-0.5.tar.gz</ulink> </td><td> Y </td><td> Y </td></tr>
-<tr><td> Python </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz</ulink> </td><td> Y </td><td> Y </td></tr>
-<tr><td> Ruby </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-ruby-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-ruby-0.5.tar.gz</ulink> </td><td> Y </td><td> Y </td></tr>
+<row><entry> C# (.NET, WCF, Excel) 0-10 client (C++ Broker Compatible) </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-10-0.5.zip">http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-10-0.5.zip</ulink> </entry><entry> Y </entry><entry> </entry></row>
+<row><entry> C# (.NET) 0-8 client (Java Broker Compatible) </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-8-0.5.zip">http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-8-0.5.zip</ulink> </entry><entry> </entry><entry> Y </entry></row>
+<row><entry> Java </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-java-client-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-java-client-0.5.tar.gz</ulink> </entry><entry> Y </entry><entry> Y </entry></row>
+<row><entry> Python </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz</ulink> </entry><entry> Y </entry><entry> Y </entry></row>
+<row><entry> Ruby </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-ruby-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-ruby-0.5.tar.gz</ulink> </entry><entry> Y </entry><entry> Y </entry></row>
</tbody>
+</tgroup>
</table>
<table>
<title>C++ broker management</title>
-<thead><tr><td> Component </td><td> Download </td><td> AMQP 0-10 </td></tr></thead>
+<tgroup cols="3" align='left' colsep='1' rowsep='1'>
+<thead><row><entry> Component </entry><entry> Download </entry><entry> AMQP 0-10 </entry></row></thead>
<tbody>
-<tr><td> cmd line (packaged with python) </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz</ulink> </td><td> Y </td></tr>
-<tr><td> QMan JMX bridge, WS-DM </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-client-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-management-client-0.5.tar.gz</ulink> </td><td> Y </td></tr>
+<row><entry> cmd line (packaged with python) </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz</ulink> </entry><entry> Y </entry></row>
+<row><entry> QMan JMX bridge, WS-DM </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-client-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-management-client-0.5.tar.gz</ulink> </entry><entry> Y </entry></row>
</tbody>
+</tgroup>
</table>
<table>
<title>Java broker management</title>
-<thead><tr><td> Component </td><td> Download </td></tr></thead>
+<tgroup cols="2" align='left' colsep='1' rowsep='1'>
+<thead><row><entry> Component </entry><entry> Download </entry></row></thead>
<tbody>
-<tr><td> Eclipse RCP client </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-eclipse-plugin-0.5-linux-gtk-x86.tar.gz">Linux x86</ulink>
+<row><entry> Eclipse RCP client </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-eclipse-plugin-0.5-linux-gtk-x86.tar.gz">Linux x86</ulink>
<ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-eclipse-plugin-0.5-linux-gtk-x86_64.tar.gz">Linux x86_64</ulink>
<ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-eclipse-plugin-0.5-macosx.zip">Mac OS X</ulink>
<ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-eclipse-plugin-0.5-win32-win32-x86.zip">Windows x86</ulink>
-</td></tr>
-<tr><td> Command line interface </td><td> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-tools-qpid-cli-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-management-tools-qpid-cli-0.5.tar.gz</ulink> </td></tr>
+</entry></row>
+<row><entry> Command line interface </entry><entry> <ulink url="http://www.apache.org/dist/qpid/0.5/qpid-management-tools-qpid-cli-0.5.tar.gz">http://www.apache.org/dist/qpid/0.5/qpid-management-tools-qpid-cli-0.5.tar.gz</ulink> </entry></row>
</tbody>
+</tgroup>
</table>
</section>
</section>
-<section><title>QpidComponents.org</title>
+<section id="qpid_3rd-Party-Libraries"><title>QpidComponents.org</title>
<para><ulink url="http://QpidComponents.org">http://QpidComponents.org</ulink> provides further components for Apache Qpid, including both persistence and management tools. These components are open source, but are not developed as part of the Apache Qpid project due to licensing or other restrictions.</para>
diff --git a/qpid/doc/book/src/Excel-AddIn.xml b/qpid/doc/book/src/Excel-AddIn.xml
index 86621370c0..e38f620bd8 100644
--- a/qpid/doc/book/src/Excel-AddIn.xml
+++ b/qpid/doc/book/src/Excel-AddIn.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -19,10 +20,9 @@
under the License.
-->
-
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : Excel AddIn
+ Excel AddIn
</title>
<section role="h1" id="ExcelAddIn-ExcelAddIn">
<title>
@@ -166,4 +166,4 @@ value="&lt;path&gt;\qpid\dotnet\client-010\addins\ExcelAddInMessageProcessor\bin
<!--h1-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Getting-Started.xml b/qpid/doc/book/src/Getting-Started.xml
index b32e105a8f..afb81ff92a 100644
--- a/qpid/doc/book/src/Getting-Started.xml
+++ b/qpid/doc/book/src/Getting-Started.xml
@@ -1,16 +1,36 @@
-<chapter>
-<section>
+<chapter id="Getting-Started">
+
+<!--
+
+ 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.
+
+-->
<title>Getting Started</title>
<para>To get started with Apache Qpid, follow the steps below.</para>
<orderedlist>
-<listitem><para>Download the software [Download]</para></listitem>
+<listitem><para><xref linkend="chapter-Download"/></para></listitem>
<listitem>
<para>Start a broker. </para>
<itemizedlist>
- <listitem><para>Instructions for [running a Qpid Java broker (AMQP 0-8, 0-9) | Getting Started Guide]</para></listitem>
- <listitem><para>Instructions for [running a Qpid C++ broker (AMQP 0-10) | RASC]</para></listitem>
- <listitem><para>[Management tools | MgmtC++] (AMQP 0-10, works with the Qpid C++ broker)</para></listitem>
+ <listitem><para><xref linkend="chapter-Running-a-Qpid-Java-Broker"/></para></listitem>
+ <listitem><para><xref linkend="section-Running-a-Qpid-CPP-Broker"/></para></listitem>
+ <listitem><para><xref linkend="chapter-Managing-CPP-Broker"/>(AMQP 0-10, works with the Qpid C++ broker)</para></listitem>
</itemizedlist>
</listitem>
<listitem>
@@ -18,35 +38,35 @@
<itemizedlist>
<listitem><para>C++ (AMQP 0-10):</para>
<itemizedlist>
- <listitem><para>Examples: [https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/ | https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/]</para></listitem>
- <listitem><para>[Running the C++ Examples | https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/README.txt]</para></listitem>
+ <listitem><para>Examples:</para><para><ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/">https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/</ulink></para></listitem>
+ <listitem><para>Running the C++ Examples:</para><para><ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/README.txt">https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/README.txt</ulink></para></listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Java JMS (AMQP 0-10):</para>
<itemizedlist>
- <listitem><para>Examples: [https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/ | https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/]</para></listitem>
- <listitem><para>[Script for Running the Java JMS Examples | https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/runSample.sh]</para></listitem>
+ <listitem><para>Examples:</para><para><ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/">https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/</ulink></para></listitem>
+ <listitem><para>Script for Running the Java JMS Examples </para><para><ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/runSample.sh">https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/runSample.sh</ulink></para></listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Python (AMQP 0-10):</para>
<itemizedlist>
- <listitem><para>Examples: [https://svn.apache.org/repos/asf/qpid/trunk/qpid/python/examples/ | https://svn.apache.org/repos/asf/qpid/trunk/qpid/python/examples/]</para></listitem>
- <listitem><para>[Running the Python Examples | https://svn.apache.org/repos/asf/qpid/trunk/qpid/python/examples/README]</para></listitem>
+ <listitem><para>Examples:</para><para><ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/python/examples/">https://svn.apache.org/repos/asf/qpid/trunk/qpid/python/examples/</ulink></para></listitem>
+ <listitem><para>Running the Python Examples</para><para><ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/python/examples/README">https://svn.apache.org/repos/asf/qpid/trunk/qpid/python/examples/README</ulink></para></listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Ruby (AMQP 0-10):</para>
<itemizedlist>
- <listitem><para>Examples: [https://svn.apache.org/repos/asf/qpid/trunk/qpid/ruby/examples/ | https://svn.apache.org/repos/asf/qpid/trunk/qpid/ruby/examples/]</para></listitem>
+ <listitem><para>Examples: </para><para><ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/ruby/examples/">https://svn.apache.org/repos/asf/qpid/trunk/qpid/ruby/examples/</ulink></para></listitem>
</itemizedlist>
</listitem>
<listitem>
<para>.NET (AMQP 0-10):</para>
<itemizedlist>
- <listitem><para>Examples: [http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/examples/ | http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/examples/]</para></listitem>
- <listitem><para>[.NET Tutorial | http://cwiki.apache.org/confluence/display/qpid/.NET+User+Guide]</para></listitem>
+ <listitem><para>Examples:</para><para><ulink url="http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/examples/">http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/examples/</ulink></para></listitem>
+ <listitem><para><xref linkend="NETUserGuide-Tutorial"/></para></listitem>
</itemizedlist>
</listitem>
</itemizedlist>
@@ -54,19 +74,17 @@
<listitem>
<para>Read the API Guides and Documentation</para>
<itemizedlist>
- <listitem><para>[C++ Client API (AMQP 0-10) | http://qpid.apache.org/docs/api/cpp/html/index.html]</para></listitem>
- <listitem><para>[JNDI Configuration for Java JMS | http://cwiki.apache.org/confluence/display/qpid/How+to+Use+JNDI]</para></listitem>
- <listitem><para>[Python Client API (AMQP 0-10) | http://qpid.apache.org/docs/api/python/html/index.html]</para></listitem>
- <listitem><para>[Documentation]</para></listitem>
+ <listitem><para>C++ Client API (AMQP 0-10)</para><para><ulink url="http://qpid.apache.org/docs/api/cpp/html/index.html"></ulink></para></listitem>
+ <listitem><para><xref linkend="How-to-Use-JNDI"/></para></listitem>
+ <listitem><para>Python Client API (AMQP 0-10)</para><para><ulink url="http://qpid.apache.org/docs/api/python/html/index.html">http://qpid.apache.org/docs/api/python/html/index.html</ulink></para></listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Get your Questions Answered</para>
<itemizedlist>
- <listitem><para>Read the [FAQ|FAQ]</para></listitem>
- <listitem><para>Ask a question on the user list mailto:users-subscribe@qpid.apache.org</para></listitem>
+ <listitem><para>Read the <xref linkend="FAQ"/></para></listitem>
+ <listitem><para>Ask a question on the user list</para><para>mailto:users-subscribe@qpid.apache.org</para></listitem>
</itemizedlist>
</listitem>
</orderedlist>
-</section>
</chapter>
diff --git a/qpid/doc/book/src/How-to-Tune-M3-Java-Broker-Performance.xml b/qpid/doc/book/src/How-to-Tune-M3-Java-Broker-Performance.xml
index 75eed5c452..f7fffbaceb 100644
--- a/qpid/doc/book/src/How-to-Tune-M3-Java-Broker-Performance.xml
+++ b/qpid/doc/book/src/How-to-Tune-M3-Java-Broker-Performance.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -19,10 +20,9 @@
under the License.
-->
-
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section id="How-to-Tune-M3-Java-Broker-Performance">
<title>
- Apache Qpid : How to Tune M3 Java Broker Performance
+ How to Tune M3 Java Broker Performance
</title>
<section role="h3" id="HowtoTuneM3JavaBrokerPerformance-ProblemStatement">
<title>
@@ -169,4 +169,4 @@
</para>
<!--h3-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/How-to-Use-JNDI.xml b/qpid/doc/book/src/How-to-Use-JNDI.xml
index f4790af7f2..74506dde0f 100644
--- a/qpid/doc/book/src/How-to-Use-JNDI.xml
+++ b/qpid/doc/book/src/How-to-Use-JNDI.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<chapter id="How-to-Use-JNDI">
<title>
- Apache Qpid : How to Use JNDI
+ How to Use JNDI
</title>
<section role="h2" id="HowtoUseJNDI-HowtousethePropertiesFileInitialContextFactory">
<title>
@@ -80,13 +80,13 @@ destination.direct = direct://amq.direct//directQueue
The property file allows a number of queues to be defined that
can then be discovered via JNDI. There are four properties used
by the PFICFactory.
- <emphasis>connectionfactory.&lt;jndiname&gt;</emphasis> this is the <xref linkend="qpid_Connection-20URL-20Format"/> that the connection
+ <emphasis>connectionfactory.&lt;jndiname&gt;</emphasis> this is the <xref linkend="Connection-URL-Format"/> that the connection
factory will use to perform connections.
<emphasis>queue.&lt;jndiname&gt;</emphasis> this defines a jms queue or in
amqp a amq.direct exchange
<emphasis>topic.&lt;jndiname&gt;</emphasis> this defines a jms topic or in
amqp a amq.topic exchange
- <emphasis>destination.&lt;jndiname&gt;</emphasis> this takes a <xref linkend="qpid_BindingURLFormat"/>
+ <emphasis>destination.&lt;jndiname&gt;</emphasis> this takes a <xref linkend="BindingURLFormat"/>
and so can be used for defining all amq destinations, queues,
topics and header matching.
</para><para>
diff --git a/qpid/doc/book/src/Introduction.xml b/qpid/doc/book/src/Introduction.xml
index d62f4fe6ac..8f92c207cf 100644
--- a/qpid/doc/book/src/Introduction.xml
+++ b/qpid/doc/book/src/Introduction.xml
@@ -1,4 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ 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.
+
+-->
+
<chapter>
+
<title>Apache Qpid: Open Source AMQP Messaging</title>
<para>Enterprise Messaging systems let programs communicate by exchanging messages, much as people communicate by exchanging email. Unlike email, enterprise messaging systems provide guaranteed delivery, speed, security, and freedom from spam. Until recently, there was no open standard for Enterprise Messaging systems, so programmers either wrote their own, or used expensive proprietary systems.</para>
diff --git a/qpid/doc/book/src/Java-Broker-Feature-Guide.xml b/qpid/doc/book/src/Java-Broker-Feature-Guide.xml
index 394a864cd7..bbc2a1aaf0 100644
--- a/qpid/doc/book/src/Java-Broker-Feature-Guide.xml
+++ b/qpid/doc/book/src/Java-Broker-Feature-Guide.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : Java Broker Feature Guide
+ Java Broker Feature Guide
</title>
<section role="h3" id="JavaBrokerFeatureGuide-TheQpidpureJavabrokercurrentlysupportsthefollowingfeatures-3A">
<title>
@@ -81,4 +81,4 @@
<!--h3-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Java-Environment-Variables.xml b/qpid/doc/book/src/Java-Environment-Variables.xml
index 868ea470aa..e4da38a260 100644
--- a/qpid/doc/book/src/Java-Environment-Variables.xml
+++ b/qpid/doc/book/src/Java-Environment-Variables.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : Java Environment Variables
+ Java Environment Variables
</title>
<section role="h2" id="JavaEnvironmentVariables-SettingQpidEnvironmentVariables">
<title>
@@ -81,4 +81,4 @@
<!--h2-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/LVQ.xml b/qpid/doc/book/src/LVQ.xml
index 5b7b4a2c9a..b3e3885b65 100644
--- a/qpid/doc/book/src/LVQ.xml
+++ b/qpid/doc/book/src/LVQ.xml
@@ -1,6 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : LVQ
+<!--
+
+ 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.
+
+-->
+
+<section><title>
+ LVQ
</title>
<section role="h2" id="LVQ-UnderstandingLVQ"><title>
@@ -338,4 +359,4 @@ int main(int argc, char** argv)
</programlisting>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Management-Console-Security.xml b/qpid/doc/book/src/Management-Console-Security.xml
index 0c1e222115..aa7bebb09e 100644
--- a/qpid/doc/book/src/Management-Console-Security.xml
+++ b/qpid/doc/book/src/Management-Console-Security.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Management Console Security
+<section><title>
+ Management Console Security
</title><section role="h1" id="ManagementConsoleSecurity-ManagementConsoleSecurity"><title>
Management
Console Security
@@ -106,7 +106,7 @@
when starting the console. This can be done at the command line,
or alternatively an example configuration has been made within
the console's qpidmc.ini launcher configuration file that may
- pre-configured in advance for repeated usage. See the <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/> for more
+ pre-configured in advance for repeated usage. See the <xref linkend="Qpid-JMX-Management-Console-User-Guide"/> for more
information on this configuration process.
</para>
<!--h3--></section>
@@ -132,7 +132,7 @@
<para>
More information on Java's handling of SSL certificate
verification and customizing the keystores can be found in the
- <xref linkend="qpid_JSSERefGuide"/> .
+ <ulink url="http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores">http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores</ulink>.
</para>
<!--h3--></section>
<!--h2--></section>
@@ -183,7 +183,7 @@ qpid-server -run:external-classpath=first
</para>
<!--h3--></section>
- <section role="h3" id="ManagementConsoleSecurity-BrokerConfiguration"><title>
+ <section role="h3" id="ManagementConsoleSecurity-BrokerConfiguration2"><title>
Broker
Configuration
</title>
@@ -209,7 +209,7 @@ qpid-server -run:external-classpath=first
</para>
<!--h3--></section>
- <section role="h3" id="ManagementConsoleSecurity-JMXManagementConsoleConfiguration"><title>
+ <section role="h3" id="ManagementConsoleSecurity-JMXManagementConsoleConfiguration-2"><title>
JMX
Management Console Configuration
</title>
@@ -243,10 +243,10 @@ qpid-server -run:external-classpath=first
<para>
In order to access the management operations via JMX, users must
have an account and have been assigned appropriate access rights.
- See <xref linkend="qpid_Configuring-20Management-20Users"/>
+ See <xref linkend="qpid_Configuring-Management-Users"/>
</para>
<!--h2--></section>
<!--h1--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Management-Design-notes.xml b/qpid/doc/book/src/Management-Design-notes.xml
index 07237c3ee2..76f0dac926 100644
--- a/qpid/doc/book/src/Management-Design-notes.xml
+++ b/qpid/doc/book/src/Management-Design-notes.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Management Design notes
+<section><title>
+ Management Design notes
</title><section role="h2" id="ManagementDesignnotes-StatusofThisDocument"><title>
Status
of This Document
@@ -35,7 +35,7 @@
</para><para>
Development continues on the Qpid Management Framework (QMF) for
M4. If you are using M3, this is the document you need. If you
- are using the SVN trunk, please refer to <xref linkend="qpid_Qpid-20Management-20Framework"/> for
+ are using the SVN trunk, please refer to <xref linkend="qpid_Qpid-Management-Framework"/> for
up-to-date information.
</para>
<!--h2--></section>
@@ -70,7 +70,7 @@
</title>
<para>
- <xref linkend="qpid_JMX-20Gateway"/>
+ <xref linkend="qpid_JMX-Gateway"/>
</para>
<!--h3--></section>
@@ -2132,5 +2132,5 @@
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/82403.xml b/qpid/doc/book/src/Managing-CPP-Broker.xml
index 6745f09477..2cb4def764 100644
--- a/qpid/doc/book/src/82403.xml
+++ b/qpid/doc/book/src/Managing-CPP-Broker.xml
@@ -20,12 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : MgmtC++
- </title><section role="h2" id="MgmtC-2B-2B-ManagingtheC-5CBroker"><title>
- Managing the C++
- Broker
- </title>
+<section id="section-Managing-CPP-Broker">
+ <title> Managing the C++ Broker </title>
<para>
There are quite a few ways to interact with the C++ broker. The
command line tools
@@ -463,5 +459,4 @@ Options:
You get the idea... have fun!
</para>
<!--h3--></section>
-<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/MessageStore-Tool.xml b/qpid/doc/book/src/MessageStore-Tool.xml
index c858ce6408..fdcb3cd560 100644
--- a/qpid/doc/book/src/MessageStore-Tool.xml
+++ b/qpid/doc/book/src/MessageStore-Tool.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : MessageStore Tool
+<section><title>
+ MessageStore Tool
</title><section role="h2" id="MessageStoreTool-MessageStoreTool"><title>
MessageStore Tool
</title>
@@ -39,7 +39,7 @@
<itemizedlist>
<listitem><para>
- <xref linkend="qpid_BDBMessageStore-20-3rd-20Party-"/>
+ <xref linkend="qpid_BDBMessageStore--3rd-Party-"/>
</para></listitem>
<listitem><para>
<xref linkend="qpid_JDBCStore"/>
@@ -147,4 +147,4 @@ bdb$
</para>
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/NET-User-Guide.xml b/qpid/doc/book/src/NET-User-Guide.xml
index 428e14377c..7bfa20b8c8 100644
--- a/qpid/doc/book/src/NET-User-Guide.xml
+++ b/qpid/doc/book/src/NET-User-Guide.xml
@@ -20,7 +20,7 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
Apache Qpid: Open Source AMQP Messaging - .NET User Guide
</title>
@@ -1024,7 +1024,7 @@ noMoreMessages(session);
<!--h3-->
</section>
- <section role="h3" id="NETUserGuide-ReadingMessagesfromtheQueue">
+ <section role="h3" id="NETUserGuide-ReadingMessagesfromtheQueue2">
<title>
Reading
Messages from the Queue
@@ -1380,4 +1380,4 @@ _session.messageTransfer("amq.direct", routingKey, response);
</section>
- </chapter>
+ </section>
diff --git a/qpid/doc/book/src/PythonBrokerTest.xml b/qpid/doc/book/src/PythonBrokerTest.xml
index 3d72023fef..ae7edade40 100644
--- a/qpid/doc/book/src/PythonBrokerTest.xml
+++ b/qpid/doc/book/src/PythonBrokerTest.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : PythonBrokerTest
+ PythonBrokerTest
</title>
<section role="h2" id="PythonBrokerTest-PythonBrokerSystemTestSuite">
<title>
@@ -95,4 +95,4 @@
<!--h2-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/QMF-Python-Console-Tutorial.xml b/qpid/doc/book/src/QMF-Python-Console-Tutorial.xml
index 00ab12b4a1..e16a94d73f 100644
--- a/qpid/doc/book/src/QMF-Python-Console-Tutorial.xml
+++ b/qpid/doc/book/src/QMF-Python-Console-Tutorial.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : QMF Python Console Tutorial
+<section><title>
+ QMF Python Console Tutorial
</title>
<itemizedlist>
<listitem><para>
@@ -84,7 +84,7 @@
network. Qpid can be downloaded as source from Apache, is
packaged with a number of Linux distributions, and can be
purchased from commercial vendors that use Qpid. Please see
- <xref linkend="qpid_Download"/> for
+ <xref linkend="chapter-Download"/> for
information as to where to get Qpid Messaging.
</para><para>
Qpid Messaging includes a message broker (qpidd) which typically
@@ -891,4 +891,4 @@ sess.bindClass("org.apache.qpid.broker", "queue")
<!--h1--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/QMan-Qpid-Management-bridge.xml b/qpid/doc/book/src/QMan-Qpid-Management-bridge.xml
index 6cce51da6f..f2c366dcbb 100644
--- a/qpid/doc/book/src/QMan-Qpid-Management-bridge.xml
+++ b/qpid/doc/book/src/QMan-Qpid-Management-bridge.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : QMan - Qpid Management bridge
+<section><title>
+ QMan - Qpid Management bridge
</title><section role="h1" id="QMan-QpidManagementbridge-QMan-3AQpidManagementBridge"><title>
QMan
: Qpid Management Bridge
@@ -76,7 +76,7 @@
</row>
<row>
<entry>
- <xref linkend="qpid_Get-20me-20up-20and-20running"/>
+ <xref linkend="qpid_Get-me-up-and-running"/>
</entry>
<entry>
How to install &amp; start QMan.
@@ -84,7 +84,7 @@
</row>
<row>
<entry>
- <xref linkend="qpid_QMan-20User-20Guide"/>
+ <xref linkend="qpid_QMan-User-Guide"/>
</entry>
<entry>
QMan (WS-DM version only) Administration Console.
@@ -92,7 +92,7 @@
</row>
<row>
<entry>
- <xref linkend="qpid_JMX-20Interface-20Specification"/>
+ <xref linkend="qpid_JMX-Interface-Specification"/>
</entry>
<entry>
Describes each JMX interface exposed by QMan.
@@ -100,7 +100,7 @@
</row>
<row>
<entry>
- <xref linkend="qpid_WS-DM-20Interface-20Specification"/>
+ <xref linkend="qpid_WS-DM-Interface-Specification"/>
</entry>
<entry>
Describes each WS-DM interface exposed by QMan.
@@ -108,7 +108,7 @@
</row>
<row>
<entry>
- <xref linkend="qpid_QMan-20Messages-20Catalogue"/>
+ <xref linkend="qpid_QMan-Messages-Catalogue"/>
</entry>
<entry>
Informational / Debug / Error / Warning messages catalogue.
@@ -142,7 +142,7 @@
</row>
<row>
<entry>
- <xref linkend="qpid_QMan-20System-20Overview"/>
+ <xref linkend="qpid_QMan-System-Overview"/>
</entry>
<entry>
A short introduction about QMan deployment context.
@@ -150,7 +150,7 @@
</row>
<row>
<entry>
- <xref linkend="qpid_QMan-20Components-20View"/>
+ <xref linkend="qpid_QMan-Components-View"/>
</entry>
<entry>
Describes QMan components, their interactions and
@@ -163,4 +163,4 @@
<!--h2--></section>
<!--h1--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Qpid-ACLs.xml b/qpid/doc/book/src/Qpid-ACLs.xml
index 1b986ffb25..14f8b81475 100644
--- a/qpid/doc/book/src/Qpid-ACLs.xml
+++ b/qpid/doc/book/src/Qpid-ACLs.xml
@@ -22,7 +22,7 @@
<section><title>
ACL Formats
- </title>Apache Qpid : Qpid ACLs
+ </title>Qpid ACLs
This page last changed on Nov 18, 2008 by ritchiem.
<para>
The Qpid project has two ACL implementations. An initial version
diff --git a/qpid/doc/book/src/Qpid-Interoperability-Documentation.xml b/qpid/doc/book/src/Qpid-Interoperability-Documentation.xml
index c67759a335..644defb374 100644
--- a/qpid/doc/book/src/Qpid-Interoperability-Documentation.xml
+++ b/qpid/doc/book/src/Qpid-Interoperability-Documentation.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Qpid Interoperability Documentation
+<chapter><title>
+ Qpid Interoperability Documentation
</title><section role="h2" id="QpidInteroperabilityDocumentation-QpidInteroperabilityDocumentation"><title>
Qpid Interoperability Documentation
</title>
@@ -235,12 +235,14 @@
</entry>
</row>
</tbody>
- </tgroup></table><para>
-
+ </tgroup></table>
+
+ <para id="QpidInteroperabilityDocumentation-1">
1: Support for these will be in M3 (currently available on
trunk).
+ </para>
- 2: C++ Broker uses <xref linkend="qpid_"/> which
+ <para id="QpidInteroperabilityDocumentation-2">2: C++ Broker uses <ulink url="http://freshmeat.net/projects/cyrussasl/">Cyrus SASL</ulink> which
supports CRAM-MD5 and GSSAPI but these have not been tested yet
</para>
<!--h4--></section>
diff --git a/qpid/doc/book/src/Qpid-JMX-Management-Console-FAQ.xml b/qpid/doc/book/src/Qpid-JMX-Management-Console-FAQ.xml
index 9f1fdf34ac..1806ab01b1 100644
--- a/qpid/doc/book/src/Qpid-JMX-Management-Console-FAQ.xml
+++ b/qpid/doc/book/src/Qpid-JMX-Management-Console-FAQ.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Qpid JMX Management Console FAQ
+<section><title>
+ Qpid JMX Management Console FAQ
</title>
<!--
h3. {toggle-cloak:id=qManagementConsoleSecurity} How do I connect the management console to my broker using security ?
@@ -51,7 +51,7 @@ To remedy this issue you can set the _java.rmi.server.hostname_ system property
</title>
<para>
- The <xref linkend="qpid_Management-20Console-20Security"/> page will give you the instructions that you should
+ The <xref linkend="qpid_Management-Console-Security"/> page will give you the instructions that you should
use to set this up.
</para>
<!--h3--></section>
@@ -93,4 +93,4 @@ To remedy this issue you can set the _java.rmi.server.hostname_ system property
</para>
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Qpid-JMX-Management-Console-User-Guide.xml b/qpid/doc/book/src/Qpid-JMX-Management-Console-User-Guide.xml
index 3d309d8831..55e1f8e829 100644
--- a/qpid/doc/book/src/Qpid-JMX-Management-Console-User-Guide.xml
+++ b/qpid/doc/book/src/Qpid-JMX-Management-Console-User-Guide.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Qpid JMX Management Console User Guide
+<section id="Qpid-JMX-Management-Console-User-Guide"><title>
+ Qpid JMX Management Console User Guide
</title><section role="h1" id="QpidJMXManagementConsoleUserGuide-QpidJMXManagementConsoleUserGuide"><title>
Qpid JMX Management Console User Guide
</title>
@@ -105,7 +105,8 @@
KeyStore and matching TrustStore. This script can serve as a
guide on how to use the Java Keytool security utility to
manipulate your own stores, and more information can be found in
- the JSSE Reference Guide: <xref linkend="qpid_JSSERefGuide"/>
+ the JSSE Reference Guide:
+ <ulink url="http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores">http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores</ulink>.
</para><para>
Supplying the necessary details to the console is performed by
setting the <emphasis>javax.net.ssl.trustStore</emphasis> and
@@ -789,4 +790,4 @@
</para>
<!--h1--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Qpid-JMX-Management-Console.xml b/qpid/doc/book/src/Qpid-JMX-Management-Console.xml
index 8503484f91..fb46f4a01a 100644
--- a/qpid/doc/book/src/Qpid-JMX-Management-Console.xml
+++ b/qpid/doc/book/src/Qpid-JMX-Management-Console.xml
@@ -20,10 +20,10 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<chapter id="Qpid-JMX-Management-Console">
<title>
- Apache Qpid : Qpid JMX Management Console
+ Qpid JMX Management Console
</title>
<section role="h2" id="QpidJMXManagementConsole-QpidJMXManagementConsole">
@@ -42,12 +42,12 @@
JMX.
</para>
- <xi:include href="Configuring%20Management%20Users.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="Configuring%20Qpid%20JMX%20Management%20Console.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="Management%20Console%20Security.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="Qpid%20JMX%20Management%20Console%20FAQ.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="Qpid%20JMX%20Management%20Console%20User%20Guide.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="Qpid%20Management%20Features.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="Configuring-Management-Users.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="Configuring-Qpid-JMX-Management-Console.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="Management-Console-Security.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="Qpid-JMX-Management-Console-FAQ.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="Qpid-JMX-Management-Console-User-Guide.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="Qpid-Management-Features.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<!--h3--></section>
<!--h2--></section>
</chapter>
diff --git a/qpid/doc/book/src/Qpid-Java-Broker-Management-CLI.xml b/qpid/doc/book/src/Qpid-Java-Broker-Management-CLI.xml
index 5c670bb22f..3042e53a3f 100644
--- a/qpid/doc/book/src/Qpid-Java-Broker-Management-CLI.xml
+++ b/qpid/doc/book/src/Qpid-Java-Broker-Management-CLI.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Qpid Java Broker Management CLI
+<section><title>
+ Qpid Java Broker Management CLI
</title>
<section role="h2" id="QpidJavaBrokerManagementCLI-HowtobuildApacheQpidCLI"><title>
How to
@@ -156,4 +156,4 @@ ant compile-tests
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Qpid-Java-Build-How-To.xml b/qpid/doc/book/src/Qpid-Java-Build-How-To.xml
index 8ea8b4c2db..f38109a3fb 100644
--- a/qpid/doc/book/src/Qpid-Java-Build-How-To.xml
+++ b/qpid/doc/book/src/Qpid-Java-Build-How-To.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Qpid Java Build How To
+<section><title>
+ Qpid Java Build How To
</title>
<section role="h1" id="QpidJavaBuildHowTo-BuildInstructionsGeneral"><title>
@@ -353,7 +353,7 @@ for i in `find . -name build.xml` ; do echo "$i:"; grep module.depends $i ; done
What next ?
</title>
<para>
- If you want to run your built Qpid package, see our <xref linkend="qpid_Getting-20Started-20Guide"/> for details of
+ If you want to run your built Qpid package, see our <xref linkend="qpid_Getting-Started-Guide"/> for details of
how to do that.
</para><para>
If you want to run our tests, you can use the ant test or
@@ -362,4 +362,4 @@ for i in `find . -name build.xml` ; do echo "$i:"; grep module.depends $i ; done
<!--h2--></section>
<!--h1--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Qpid-Java-FAQ.xml b/qpid/doc/book/src/Qpid-Java-FAQ.xml
index 181b0a3fcc..7a28703774 100644
--- a/qpid/doc/book/src/Qpid-Java-FAQ.xml
+++ b/qpid/doc/book/src/Qpid-Java-FAQ.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Qpid Java FAQ
+<section><title>
+ Qpid Java FAQ
</title>
<section role="h2" id="QpidJavaFAQ-Purpose">
@@ -55,7 +55,7 @@
<listitem><para>Persistence using the high performance Berkeley DB Java
Edition. The persistence layer is also pluggable should an
alternative implementation be required. The BDB store is
- available from the <xref linkend="qpid_3rd-20Party-20Libraries"/> page
+ available from the <xref linkend="qpid_3rd-Party-Libraries"/> page
</para></listitem>
<listitem><para>Pluggable security using SASL. Any Java SASL provider can be
used
@@ -168,7 +168,7 @@ at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatab
manifest files to your classpath.
</para><para>
For more information on running the broker please see our
- <xref linkend="qpid_Getting-20Started"/> page.
+ <xref linkend="Getting-Started"/> page.
</para>
<!--h3--></section>
@@ -178,7 +178,7 @@ at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatab
</title>
<para>
- Please see the <xref linkend="qpid_Connection-20URL-20Format"/> documentation.
+ Please see the <xref linkend="qpid_Connection-URL-Format"/> documentation.
</para>
<!--h3--></section>
@@ -203,7 +203,7 @@ at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatab
Queue names may consist of any mixture of digits, letters, and
underscores.
</para><para>
- The <xref linkend="qpid_BindingURLFormat"/> is described in more
+ The <xref linkend="BindingURLFormat"/> is described in more
detail on it's own page.
</para>
<!--h4--></section>
@@ -252,7 +252,7 @@ at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatab
</title>
<para>
- see <xref linkend="qpid_How-20to-20Use-20JNDI"/>
+ see <xref linkend="How-to-Use-JNDI"/>
</para>
<!--h3--></section>
@@ -262,8 +262,10 @@ at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatab
</title>
<para>
- Here is a donated Spring configuration file <xref linkend="qpid_2264.zip"/> which shows the
- config for Qpid side by side with Weblogic. HtH !
+ Here is a donated Spring configuration file <ulink
+ url="http://qpid.apache.org/qpid-java-faq.data/appContext.zip">appContext.zip</ulink>
+ which shows the config for Qpid side by side with
+ Weblogic. HtH !
</para>
<!--h3--></section>
@@ -323,13 +325,13 @@ amqj.logging.level
qpid-server -c &lt;your_config_file's_path&gt;
</para><para>
For more detailed information on configuration, please see
- <xref linkend="qpid_Qpid-20Design-20--20Configuration"/>
+ <xref linkend="qpid_Qpid-Design---Configuration"/>
</para><para>
</para>
<!--h3--></section>
- <section role="h3" id="QpidJavaFAQ-Whatportsdoesthebrokeruse-3F"><title>
+ <section role="h3" id="QpidJavaFAQ-Whatportsdoesthebrokeruse"><title>
What ports
does the broker use?
</title>
@@ -371,7 +373,7 @@ amqj.logging.level
For additional details on what ports the broker uses see <xref linkend="QpidJavaFAQ-Whatportsdoesthebrokeruse"/> FAQ
entry.
For more detailed information on configuration, please see
- <xref linkend="qpid_Qpid-20Design-20--20Configuration"/>
+ <xref linkend="qpid_Qpid-Design---Configuration"/>
</para>
<!--h3--></section>
@@ -586,7 +588,7 @@ amqj.logging.level
<para>
There are a number of tuning options available, please see the
- <xref linkend="qpid_How-20to-20Tune-20M3-20Java-20Broker-20Performance"/> page for more information.
+ <xref linkend="How-to-Tune-M3-Java-Broker-Performance"/> page for more information.
</para>
<!--h3--></section>
@@ -678,12 +680,12 @@ amqj.logging.level
<para>
For general questions, please subscribe to the
- users@qpid.apache.org mailing list (<xref linkend="qpid_"/>).
+ <ulink url="mailto:users@qpid.apache.org">users@qpid.apache.org</ulink> mailing list.
</para><para>
For development questions, please subscribe to the
- dev@qpid.apache.org mailing list (<xref linkend="qpid_"/>).
+ <ulink url="mailto:dev@qpid.apache.org">dev@qpid.apache.org</ulink> mailing list.
</para><para>
- More details on these lists are available on our <xref linkend="qpid_Mailing-20Lists"/>
+ More details on these lists are available on our <xref linkend="qpid_Mailing-Lists"/>
page.
</para>
<!--h3--></section>
@@ -693,7 +695,7 @@ amqj.logging.level
</title>
<para>
- You can do this via the <xref linkend="qpid_Qpid-20JMX-20Management-20Console"/>. To
+ You can do this via the <xref linkend="qpid_Qpid-JMX-Management-Console"/>. To
do this simply log in to the management console as an admin user
(you need to have created an admin account in the
jmxremote.access file first) and then select the 'UserManagement'
@@ -705,7 +707,7 @@ amqj.logging.level
to be disconnected if they are already connected.
</para><para>
For more information on the Management Console please see our
- <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/>
+ <xref linkend="Qpid-JMX-Management-Console-User-Guide"/>
</para>
<!--h3--></section>
@@ -740,14 +742,15 @@ amqj.logging.level
</title>
<para>
- I would take a look at the testPassiveTTL in <xref linkend="qpid_TimeToLiveTest.java?revision=683950&amp;view=markup"/>
+ I would take a look at the testPassiveTTL in
+ <ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java">TimeToLiveTest.java</ulink>
</para><para>
The setUp and tearDown methods show how to correctly start up a
broker for InVM testing. If you write your tests using a file for
the JNDI you can then very easily swap between running your tests
InVM and against a real broker.
</para><para>
- See our <xref linkend="qpid_How-20to-20Use-20JNDI"/> on how to confgure it
+ See our <xref linkend="How-to-Use-JNDI"/> on how to confgure it
</para><para>
Basically though you just need to set two System Properites:
</para><para>
@@ -771,10 +774,10 @@ amqj.logging.level
There are two possibilities here:
</para><para>
1) The management console can be used to interogate an active
- broker and browse the contents of a queue.See the <xref linkend="qpid_Qpid-20JMX-20Management-20Console"/>
+ broker and browse the contents of a queue.See the <xref linkend="qpid_Qpid-JMX-Management-Console"/>
page for further details.
</para><para>
- 2) The <xref linkend="qpid_MessageStore-20Tool"/> can be used to inspect
+ 2) The <xref linkend="qpid_MessageStore-Tool"/> can be used to inspect
the contents of a persistent message store. Note: this can
currently only be used when the broker is offline.
</para>
@@ -821,7 +824,7 @@ amqj.logging.level
</para><para>
You may also want to increase the memory allowance to the broker
though this will only delay the exception if you are publishing
- messages faster than you are consuming. See <xref linkend="qpid_Java-20Environment-20Variables"/> for
+ messages faster than you are consuming. See <xref linkend="qpid_Java-Environment-Variables"/> for
details of changing the memory settings.
</para>
<!--h3--></section>
@@ -899,7 +902,7 @@ java.lang.NullPointerException
<para>
You have not configured the console's SSL trust store properly,
- see <xref linkend="qpid_Management-20Console-20Security"/> for
+ see <xref linkend="qpid_Management-Console-Security"/> for
more details.
</para>
<!--h3--></section>
@@ -923,7 +926,7 @@ java.lang.NullPointerException
Transfer accross the network and b) to be fully written to disk.
</para><para>
These situations require that the default timeout value be
- increased. A cilent <xref linkend="qpid_System-20Properties"/> 'amqj.default_syncwrite_timeout' can be set
+ increased. A cilent <xref linkend="qpid_System-Properties"/> 'amqj.default_syncwrite_timeout' can be set
on the client to increase the wait time. The default in 0.5 is
30000 (30s).
</para>
@@ -935,7 +938,7 @@ java.lang.NullPointerException
</title>
<para>
- See <xref linkend="qpid_Configure-20Broker-20and-20Client-20Heartbeating"/>
+ See <xref linkend="qpid_Configure-Broker-and-Client-Heartbeating"/>
</para>
<!--h3--></section>
@@ -943,4 +946,4 @@ java.lang.NullPointerException
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Qpid-Management-Features.xml b/qpid/doc/book/src/Qpid-Management-Features.xml
index 2fb84ff291..c90d7e97c6 100644
--- a/qpid/doc/book/src/Qpid-Management-Features.xml
+++ b/qpid/doc/book/src/Qpid-Management-Features.xml
@@ -20,12 +20,12 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : Qpid Management Features
+ Qpid Management Features
</title>
<para>
- <emphasis>Management tool:</emphasis> See our <xref linkend="qpid_Qpid-20JMX-20Management-20Console"/> for
+ <emphasis>Management tool:</emphasis> See our <xref linkend="qpid_Qpid-JMX-Management-Console"/> for
details of how to use various console options with the Qpid
management features.
</para>
@@ -152,7 +152,7 @@
</para></listitem>
<listitem><para>Dropping a connection.
</para></listitem>
- <listitem><para>The work for <xref linkend="qpid_Network-20IO-20Interface"/> implies that
+ <listitem><para>The work for <xref linkend="qpid_Network-IO-Interface"/> implies that
there are potentially some additional requirements
<orderedlist>
<listitem><para>Alert when tcp flow control kicks in
@@ -179,8 +179,7 @@
</para></listitem>
<listitem><para>Creating a Queue.
</para></listitem>
- <listitem><para>Deleting a
- Queue.        
+ <listitem><para>Deleting a Queue.
</para></listitem>
</orderedlist>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Qpid-Management-Framework.xml b/qpid/doc/book/src/Qpid-Management-Framework.xml
index f82be57317..7164a9bb1a 100644
--- a/qpid/doc/book/src/Qpid-Management-Framework.xml
+++ b/qpid/doc/book/src/Qpid-Management-Framework.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Qpid Management Framework
+<section><title>
+ Qpid Management Framework
</title>
<itemizedlist>
<listitem><para>
@@ -58,7 +58,7 @@
</itemizedlist>
<para>
- Please visit the <xref linkend="qpid_QMFv2-20Project-20Page"/> for information
+ Please visit the <xref linkend="qpid_QMFv2-Project-Page"/> for information
about the future of QMF.
</para>
<section role="h1" id="QpidManagementFramework-WhatIsQMF"><title>
@@ -915,10 +915,10 @@
one another.
</para><para>
A description of the current version of the QMF protocol can be
- found at <xref linkend="qpid_QMF-20Protocol"/>.
+ found at <xref linkend="qpid_QMF-Protocol"/>.
</para><para>
A proposal for an updated protocol based on map-messages is in
- progress and can be found at <xref linkend="qpid_QMF-20Map-20Message-20Protocol"/>.
+ progress and can be found at <xref linkend="qpid_QMF-Map-Message-Protocol"/>.
</para>
<!--h1--></section>
@@ -928,7 +928,7 @@
</title>
<para>
- Please see the <xref linkend="qpid_QMF-20Python-20Console-20Tutorial"/> for information about using the console API with
+ Please see the <xref linkend="qpid_QMF-Python-Console-Tutorial"/> for information about using the console API with
Python.
</para>
<!--h1--></section>
@@ -941,4 +941,4 @@
<!--h1--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Qpid-Troubleshooting-Guide.xml b/qpid/doc/book/src/Qpid-Troubleshooting-Guide.xml
index 12cbd7ed25..cc642f2cdb 100644
--- a/qpid/doc/book/src/Qpid-Troubleshooting-Guide.xml
+++ b/qpid/doc/book/src/Qpid-Troubleshooting-Guide.xml
@@ -20,10 +20,10 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : Qpid Troubleshooting Guide
+ Qpid Troubleshooting Guide
</title>
<section role="h2" id="QpidTroubleshootingGuide-I-27mgettingajava.lang.UnsupportedClassVersionErrorwhenItrytostartthebroker.Whatdoesthismean-3F"><title>
@@ -149,8 +149,8 @@
should always be created at broker startup. If you don't want to
use this config, then simply ensure that you consume first from
queue before staring to publish to it. See the entry on our
- <xref linkend="qpid_Qpid-20Java-20FAQ"/> for more details of using the virtualhosts.xml route.
+ <xref linkend="qpid_Qpid-Java-FAQ"/> for more details of using the virtualhosts.xml route.
</para>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/RASC.xml b/qpid/doc/book/src/Running-CPP-Broker.xml
index 84a76ebff3..5ab7de02f2 100644
--- a/qpid/doc/book/src/RASC.xml
+++ b/qpid/doc/book/src/Running-CPP-Broker.xml
@@ -20,11 +20,12 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : RASC
- </title>
+<section id="section-Running-a-Qpid-CPP-Broker">
+ <title>
+ Running a Qpid C++ Broker
+ </title>
- <section role="h2" id="RASC-BuildingtheC-5CBrokerandClientLibraries"><title>
+ <section role="h2" id="RASC-BuildingtheCppBrokerandClientLibraries"><title>
Building the
C++ Broker and Client Libraries
</title>
@@ -35,11 +36,11 @@
most cases you will do the following:
</para>
<programlisting>
-[qpidc-0.4]$ ./configure}}
+[qpidc-0.4]$ ./configure
[qpidc-0.4]$ make
</programlisting>
<!--h2--></section>
- <section role="h2" id="RASC-RunningtheC-5CBroker"><title>
+ <section role="h2" id="RASC-RunningtheCppBroker"><title>
Running the C++ Broker
</title>
<para>
@@ -145,7 +146,7 @@ daemon=yes
log-to-syslog=yes
</programlisting>
<!--h3--></section>
- <section role="h3" id="RASC-CanIuseanyLanguageclientwiththeC-5CBroker-3F"><title>
+ <section role="h3" id="RASC-CanIuseanyLanguageclientwiththeCppBroker-3F"><title>
Can I use
any Language client with the C++ Broker?
</title>
@@ -159,13 +160,13 @@ log-to-syslog=yes
using the Java client refer to these pages:
</para><itemizedlist>
<listitem><para>
- <xref linkend="qpid_How-20to-20Use-20JNDI"/>
+ <xref linkend="How-to-Use-JNDI"/>
</para></listitem>
<listitem><para>
- <xref linkend="qpid_URL-20Formats"/>
+ <xref linkend="qpid_URL-Formats"/>
</para></listitem>
<listitem><para>
- <xref linkend="qpid_Example-20Classes"/>
+ <xref linkend="qpid_Example-Classes"/>
</para></listitem>
</itemizedlist>
<!--h3--></section>
@@ -324,4 +325,4 @@ Store Options:
pages (1 read page = 64kiB)
</programlisting>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/SSL.xml b/qpid/doc/book/src/SSL.xml
index 36d0586c80..a9a5cb953a 100644
--- a/qpid/doc/book/src/SSL.xml
+++ b/qpid/doc/book/src/SSL.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : SSL
+<section><title>
+ SSL
</title>
<section role="h1" id="SSL-SSLHowto"><title>
@@ -177,4 +177,4 @@ public void connectSSL(String host, int port, String virtualHost, String usernam
</para>
<!--h2--></section>
<!--h1--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Starting-a-cluster.xml b/qpid/doc/book/src/Starting-a-cluster.xml
index c5e77bcac5..5f2fb2587e 100644
--- a/qpid/doc/book/src/Starting-a-cluster.xml
+++ b/qpid/doc/book/src/Starting-a-cluster.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Starting a cluster
+<section><title>
+ Starting a cluster
</title><section role="h1" id="Startingacluster-RunningaQpiddcluster"><title>
Running a
Qpidd cluster
@@ -222,4 +222,4 @@ qpidd -p5674 --cluster-name=MY_CLUSTER --log-output=cluster0.log -d --no-data-di
</para>
<!--h2--></section>
<!--h1--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/System-Properties.xml b/qpid/doc/book/src/System-Properties.xml
index 62c4c5e5a6..d61673f234 100644
--- a/qpid/doc/book/src/System-Properties.xml
+++ b/qpid/doc/book/src/System-Properties.xml
@@ -20,10 +20,10 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : System Properties
+ System Properties
</title>
<section role="h2" id="SystemProperties-ExplanationofSystempropertiesusedinQpid">
@@ -79,7 +79,7 @@
- <varlistentry>
+ <varlistentry id="SystemProperties-STRICTAMQPFATAL">
<term>STRICT_AMQP_FATAL</term>
<listitem>
<variablelist>
@@ -414,4 +414,4 @@
</variablelist>
</section>
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Use-Priority-Queues.xml b/qpid/doc/book/src/Use-Priority-Queues.xml
index b9900129cb..eeac3de06d 100644
--- a/qpid/doc/book/src/Use-Priority-Queues.xml
+++ b/qpid/doc/book/src/Use-Priority-Queues.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Use Priority Queues
+<section><title>
+ Use Priority Queues
</title>
@@ -111,7 +111,7 @@
</programlisting>
<para>
The prefetch can be also be adjusted on a per connection basis by
- adding a 'maxprefetch' value to the <xref linkend="qpid_Connection-20URL-20Format"/>
+ adding a 'maxprefetch' value to the <xref linkend="Connection-URL-Format"/>
</para>
<programlisting>
amqp://guest:guest@client1/development?maxprefetch='1'&amp;brokerlist='tcp://localhost:5672'
@@ -135,4 +135,4 @@ amqp://guest:guest@client1/development?maxprefetch='1'&amp;brokerlist='tcp://loc
</para>
<!--h3--></section>
<!--h2--></section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Using-Broker-Federation.xml b/qpid/doc/book/src/Using-Broker-Federation.xml
index 61f33c4979..3425cbb405 100644
--- a/qpid/doc/book/src/Using-Broker-Federation.xml
+++ b/qpid/doc/book/src/Using-Broker-Federation.xml
@@ -20,8 +20,8 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title>
- Apache Qpid : Using Broker Federation
+<section><title>
+ Using Broker Federation
</title><section role="h1" id="UsingBrokerFederation-Introduction"><title>
Introduction
</title>
@@ -29,10 +29,12 @@
Please note: Whereas broker federation was introduced in the M3
milestone release, the discussion in this document is based on
the richer capabilities of federation in the M4 release.
- </para><para>
- This document presents broker federation for the administrative
- user. For design and developer information, please see <xref linkend="qpid_Federation-20Design-20Note"/>.
</para>
+<!--
+ <para>
+ This document presents broker federation for the administrative
+ user. For design and developer information, please see <xref linkend="qpid_Federation-Design-Note"/>.
+ </para> -->
<!--h1--></section>
<section role="h1" id="UsingBrokerFederation-WhatIsBrokerFederation-3F"><title>
@@ -699,4 +701,4 @@ qpid-route dynamic add $broker8 $broker6 fed.topic
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/Using-Qpid-with-other-JNDI-Providers.xml b/qpid/doc/book/src/Using-Qpid-with-other-JNDI-Providers.xml
index ed12f37e94..2bd7d761ef 100644
--- a/qpid/doc/book/src/Using-Qpid-with-other-JNDI-Providers.xml
+++ b/qpid/doc/book/src/Using-Qpid-with-other-JNDI-Providers.xml
@@ -20,10 +20,10 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<chapter>
<title>
- Apache Qpid : Using Qpid with other JNDI Providers
+ Using Qpid with other JNDI Providers
</title>
<section role="h2" id="UsingQpidwithotherJNDIProviders-HowtouseaJNDIProvider">
diff --git a/qpid/doc/book/src/WCF.xml b/qpid/doc/book/src/WCF.xml
index 5040ed0177..aaf54463db 100644
--- a/qpid/doc/book/src/WCF.xml
+++ b/qpid/doc/book/src/WCF.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : WCF
+ WCF
</title>
<section role="h1" id="WCF-Introduction">
<title>
@@ -134,4 +134,4 @@ service.Open();
</programlisting>
<!--h1-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/queue-state-replication.xml b/qpid/doc/book/src/queue-state-replication.xml
index dedcc5ec34..43deb3c1b8 100644
--- a/qpid/doc/book/src/queue-state-replication.xml
+++ b/qpid/doc/book/src/queue-state-replication.xml
@@ -20,9 +20,9 @@
-->
-<chapter xmlns:html="http://www.w3.org/1999/xhtml">
+<section>
<title>
- Apache Qpid : queue state replication
+ queue state replication
</title>
<section role="h2" id="queuestatereplication-AsynchronousReplicationofQueueState">
@@ -330,4 +330,4 @@ Queue Replication Options:
</section>
<!--h2-->
</section>
-</chapter>
+</section>
diff --git a/qpid/doc/book/src/schemas.xml b/qpid/doc/book/src/schemas.xml
index 0ab56a8bdb..b78cdd5d3c 100644
--- a/qpid/doc/book/src/schemas.xml
+++ b/qpid/doc/book/src/schemas.xml
@@ -21,6 +21,12 @@
-->
<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
+ <uri resource="Download.xml" typeId="DocBook"/>
+ <uri resource="Getting-Started.xml" typeId="DocBook"/>
+ <uri resource="WCF.xml" typeId="DocBook"/>
+ <uri resource="Book-Info.xml" typeId="DocBook"/>
+ <uri resource="Book-Info.xml" typeId="DocBook"/>
+ <uri resource="Book.xml" uri="../../../../../../../usr/share/xml/docbook5/schema/rng/5.0/docbookxi.rnc"/>
<uri resource="queue%20state%20replication.xml" typeId="DocBook"/>
<uri resource="queue state replication.xml" typeId="DocBook"/>
<uri resource="AMQP Ruby Messaging Client.xml" typeId="DocBook"/>
diff --git a/qpid/extras/qmf/src/py/qmf2/agent.py b/qpid/extras/qmf/src/py/qmf2/agent.py
index d884325071..b39c8d44aa 100644
--- a/qpid/extras/qmf/src/py/qmf2/agent.py
+++ b/qpid/extras/qmf/src/py/qmf2/agent.py
@@ -17,10 +17,10 @@
#
import sys
-import logging
import datetime
import time
import Queue
+from logging import getLogger
from threading import Thread, RLock, currentThread, Event
from qpid.messaging import Connection, Message, Empty, SendError
from uuid import uuid4
@@ -32,6 +32,8 @@ from common import (OpCode, QmfQuery, ContentType, SchemaObjectClass,
# running the agent notifier callback
_callback_thread=None
+log = getLogger("qmf")
+trace = getLogger("qmf.agent")
##==============================================================================
@@ -83,37 +85,6 @@ class MethodCallParams(object):
## SUBSCRIPTIONS
##==============================================================================
-class _ConsoleHandle(object):
- """
- """
- def __init__(self, handle, reply_to):
- self.console_handle = handle
- self.reply_to = reply_to
-
-class SubscriptionParams(object):
- """
- """
- def __init__(self, console_handle, query, interval, duration, user_id):
- self._console_handle = console_handle
- self._query = query
- self._interval = interval
- self._duration = duration
- self._user_id = user_id
-
- def get_console_handle(self):
- return self._console_handle
-
- def get_query(self):
- return self._query
-
- def get_interval(self):
- return self._interval
-
- def get_duration(self):
- return self._duration
-
- def get_user_id(self):
- return self._user_id
class _SubscriptionState(object):
"""
@@ -128,6 +99,7 @@ class _SubscriptionState(object):
now = datetime.datetime.utcnow()
self.next_update = now # do an immediate update
self.expiration = now + datetime.timedelta(seconds=duration)
+ self.last_update = None
self.id = 0
def resubscribe(self, now, _duration=None):
@@ -135,9 +107,9 @@ class _SubscriptionState(object):
self.duration = _duration
self.expiration = now + datetime.timedelta(seconds=self.duration)
- def reset_interval(self, now):
+ def published(self, now):
self.next_update = now + datetime.timedelta(seconds=self.interval)
-
+ self.last_update = now
##==============================================================================
@@ -193,6 +165,9 @@ class Agent(Thread):
self._subscriptions = {}
self._next_subscribe_event = None
+ # prevents multiple _wake_thread() calls
+ self._noop_pending = False
+
def destroy(self, timeout=None):
"""
@@ -202,10 +177,10 @@ class Agent(Thread):
@type timeout: float
@param timeout: maximum time in seconds to wait for all background threads to terminate. Default: forever.
"""
- logging.debug("Destroying Agent %s" % self.name)
+ trace.debug("Destroying Agent %s" % self.name)
if self._conn:
self.remove_connection(timeout)
- logging.debug("Agent Destroyed")
+ trace.debug("Agent Destroyed")
def get_name(self):
@@ -223,7 +198,7 @@ class Agent(Thread):
" x-properties:"
" {type:direct}}}",
capacity=self._capacity)
- logging.debug("my direct addr=%s" % self._direct_receiver.source)
+ trace.debug("my direct addr=%s" % self._direct_receiver.source)
# for sending directly addressed messages.
self._direct_sender = self._session.sender(str(self._address.get_node()) +
@@ -232,7 +207,7 @@ class Agent(Thread):
" {type:topic,"
" x-properties:"
" {type:direct}}}")
- logging.debug("my default direct send addr=%s" % self._direct_sender.target)
+ trace.debug("my default direct send addr=%s" % self._direct_sender.target)
# for receiving "broadcast" messages from consoles
default_addr = QmfAddress.topic(QmfAddress.SUBJECT_CONSOLE_IND + ".#",
@@ -242,7 +217,7 @@ class Agent(Thread):
" node-properties:"
" {type:topic}}",
capacity=self._capacity)
- logging.debug("console.ind addr=%s" % self._topic_receiver.source)
+ trace.debug("console.ind addr=%s" % self._topic_receiver.source)
# for sending to topic subscribers
ind_addr = QmfAddress.topic(QmfAddress.SUBJECT_AGENT_IND,
@@ -251,7 +226,7 @@ class Agent(Thread):
";{create:always,"
" node-properties:"
" {type:topic}}")
- logging.debug("agent.ind addr=%s" % self._topic_sender.target)
+ trace.debug("agent.ind addr=%s" % self._topic_sender.target)
self._running = True
self.start()
@@ -264,22 +239,11 @@ class Agent(Thread):
self._running = False
if self.isAlive():
# kick my thread to wake it up
- try:
- msg = Message(id=QMF_APP_ID,
- subject=self.name,
- properties={ "method":"request",
- "qmf.opcode":OpCode.noop},
- content={})
-
- # TRACE
- #logging.error("!!! sending wakeup to myself: %s" % msg)
- self._direct_sender.send( msg, sync=True )
- except SendError, e:
- logging.error(str(e))
- logging.debug("waiting for agent receiver thread to exit")
+ self._wake_thread()
+ trace.debug("waiting for agent receiver thread to exit")
self.join(timeout)
if self.isAlive():
- logging.error( "Agent thread '%s' is hung..." % self.name)
+ log.error( "Agent thread '%s' is hung..." % self.name)
self._direct_receiver.close()
self._direct_receiver = None
self._direct_sender.close()
@@ -291,7 +255,7 @@ class Agent(Thread):
self._session.close()
self._session = None
self._conn = None
- logging.debug("agent connection removal complete")
+ trace.debug("agent connection removal complete")
def register_object_class(self, schema):
"""
@@ -341,7 +305,7 @@ class Agent(Thread):
"qmf.agent":self.name},
content=[qmfEvent.map_encode()])
# TRACE
- # logging.error("!!! Agent %s sending Event (%s)" %
+ # log.error("!!! Agent %s sending Event (%s)" %
# (self.name, str(msg)))
self._topic_sender.send(msg)
@@ -349,7 +313,6 @@ class Agent(Thread):
"""
Register an instance of a QmfAgentData object.
"""
- # @todo: need to update subscriptions
# @todo: need to mark schema as "non-const"
if not isinstance(data, QmfAgentData):
raise TypeError("QmfAgentData instance expected")
@@ -369,6 +332,18 @@ class Agent(Thread):
self._described_data[sid][oid] = data
else:
self._undescribed_data[oid] = data
+
+ # does the new object match any subscriptions?
+ now = datetime.datetime.utcnow()
+ for sid,sub in self._subscriptions.iteritems():
+ if sub.query.evaluate(data):
+ # matched. Mark the subscription as needing to be
+ # serviced. The _publish() method will notice the new
+ # object and will publish it next time it runs.
+ sub.next_update = now
+ self._next_subscribe_event = None
+ # @todo: should we immediately publish?
+
finally:
self._lock.release()
@@ -387,7 +362,7 @@ class Agent(Thread):
return data
- def method_response(self, handle, _out_args=None, _error=None):
+ def method_response(self, handle, _out_args=None, _error=None):
"""
"""
if not isinstance(handle, _MethodCallHandle):
@@ -449,14 +424,14 @@ class Agent(Thread):
#
# Process inbound messages
#
- logging.debug("%s processing inbound messages..." % self.name)
+ trace.debug("%s processing inbound messages..." % self.name)
for i in range(batch_limit):
try:
msg = self._topic_receiver.fetch(timeout=0)
except Empty:
break
# TRACE
- # logging.error("!!! Agent %s: msg on %s [%s]" %
+ # log.error("!!! Agent %s: msg on %s [%s]" %
# (self.name, self._topic_receiver.source, msg))
self._dispatch(msg, _direct=False)
@@ -466,7 +441,7 @@ class Agent(Thread):
except Empty:
break
# TRACE
- # logging.error("!!! Agent %s: msg on %s [%s]" %
+ # log.error("!!! Agent %s: msg on %s [%s]" %
# (self.name, self._direct_receiver.source, msg))
self._dispatch(msg, _direct=True)
@@ -475,7 +450,7 @@ class Agent(Thread):
#
now = datetime.datetime.utcnow()
if now >= next_heartbeat:
- logging.debug("%s sending heartbeat..." % self.name)
+ trace.debug("%s sending heartbeat..." % self.name)
ind = Message(id=QMF_APP_ID,
subject=QmfAddress.SUBJECT_AGENT_HEARTBEAT,
properties={"method":"indication",
@@ -483,73 +458,72 @@ class Agent(Thread):
"qmf.agent":self.name},
content=self._makeAgentInfoBody())
# TRACE
- #logging.error("!!! Agent %s sending Heartbeat (%s)" %
+ #log.error("!!! Agent %s sending Heartbeat (%s)" %
# (self.name, str(ind)))
self._topic_sender.send(ind)
- logging.debug("Agent Indication Sent")
+ trace.debug("Agent Indication Sent")
next_heartbeat = now + datetime.timedelta(seconds = self._heartbeat_interval)
-
-
#
# Monitor Subscriptions
#
- if (self._next_subscribe_event is None or
- now >= self._next_subscribe_event):
-
- logging.debug("%s polling subscriptions..." % self.name)
- self._next_subscribe_event = now + datetime.timedelta(seconds=
+ self._lock.acquire()
+ try:
+ now = datetime.datetime.utcnow()
+ if (self._next_subscribe_event is None or
+ now >= self._next_subscribe_event):
+ trace.debug("%s polling subscriptions..." % self.name)
+ self._next_subscribe_event = now + datetime.timedelta(seconds=
self._max_duration)
- self._lock.acquire()
- try:
- dead_ss = []
+ dead_ss = {}
for sid,ss in self._subscriptions.iteritems():
if now >= ss.expiration:
- dead_ss.append(sid)
+ dead_ss[sid] = ss
continue
if now >= ss.next_update:
- response = []
- objs = self._queryData(ss.query)
- if objs:
- for obj in objs:
- response.append(obj.map_encode())
- logging.debug("!!! %s publishing %s!!!" % (self.name, ss.correlation_id))
- self._send_query_response( ContentType.data,
- ss.correlation_id,
- ss.reply_to,
- response)
- ss.reset_interval(now)
-
+ self._publish(ss)
next_timeout = min(ss.expiration, ss.next_update)
if next_timeout < self._next_subscribe_event:
self._next_subscribe_event = next_timeout
- for sid in dead_ss:
+ for sid,ss in dead_ss.iteritems():
del self._subscriptions[sid]
- finally:
- self._lock.release()
+ self._unpublish(ss)
+ finally:
+ self._lock.release()
#
# notify application of pending WorkItems
#
-
if self._work_q_put and self._notifier:
- logging.debug("%s notifying application..." % self.name)
+ trace.debug("%s notifying application..." % self.name)
# new stuff on work queue, kick the the application...
self._work_q_put = False
_callback_thread = currentThread()
- logging.info("Calling agent notifier.indication")
+ trace.debug("Calling agent notifier.indication")
self._notifier.indication()
_callback_thread = None
#
# Sleep until messages arrive or something times out
#
- next_timeout = min(next_heartbeat, self._next_subscribe_event)
- timeout = timedelta_to_secs(next_timeout -
- datetime.datetime.utcnow())
- if timeout > 0.0:
- logging.debug("%s sleeping %s seconds..." % (self.name,
+ now = datetime.datetime.utcnow()
+ next_timeout = next_heartbeat
+ self._lock.acquire()
+ try:
+ # the mailbox expire flag may be cleared by the
+ # app thread(s) in order to force an immediate publish
+ if self._next_subscribe_event is None:
+ next_timeout = now
+ elif self._next_subscribe_event < next_timeout:
+ next_timeout = self._next_subscribe_event
+ finally:
+ self._lock.release()
+
+ timeout = timedelta_to_secs(next_timeout - now)
+
+ if self._running and timeout > 0.0:
+ trace.debug("%s sleeping %s seconds..." % (self.name,
timeout))
try:
self._session.next_receiver(timeout=timeout)
@@ -557,7 +531,7 @@ class Agent(Thread):
pass
-
+ trace.debug("Shutting down Agent %s thread" % self.name)
#
# Private:
@@ -578,24 +552,24 @@ class Agent(Thread):
try:
reply_to = QmfAddress.from_string(str(reply_to))
except ValueError:
- logging.error("Invalid reply-to address '%s'" % reply_to)
+ log.error("Invalid reply-to address '%s'" % reply_to)
msg.subject = reply_to.get_subject()
try:
if reply_to.is_direct():
# TRACE
- #logging.error("!!! Agent %s direct REPLY-To:%s (%s)" %
+ #log.error("!!! Agent %s direct REPLY-To:%s (%s)" %
# (self.name, str(reply_to), str(msg)))
self._direct_sender.send(msg)
else:
# TRACE
- # logging.error("!!! Agent %s topic REPLY-To:%s (%s)" %
+ # log.error("!!! Agent %s topic REPLY-To:%s (%s)" %
# (self.name, str(reply_to), str(msg)))
self._topic_sender.send(msg)
- logging.debug("reply msg sent to [%s]" % str(reply_to))
+ trace.debug("reply msg sent to [%s]" % str(reply_to))
except SendError, e:
- logging.error("Failed to send reply msg '%s' (%s)" % (msg, str(e)))
+ log.error("Failed to send reply msg '%s' (%s)" % (msg, str(e)))
def _send_query_response(self, content_type, cid, reply_to, objects):
"""
@@ -640,12 +614,11 @@ class Agent(Thread):
@param _direct: True if msg directly addressed to this agent.
"""
- # logging.debug( "Message received from Console! [%s]" % msg )
- # logging.error( "%s Message received from Console! [%s]" % (self.name, msg) )
+ trace.debug( "Message received from Console! [%s]" % msg )
opcode = msg.properties.get("qmf.opcode")
if not opcode:
- logging.warning("Ignoring unrecognized message '%s'" % msg)
+ log.warning("Ignoring unrecognized message '%s'" % msg)
return
version = 2 # @todo: fix me
cmap = {}; props={}
@@ -667,16 +640,17 @@ class Agent(Thread):
elif opcode == OpCode.subscribe_cancel_ind:
self._handleUnsubscribeReqMsg(msg, cmap, props, version, _direct)
elif opcode == OpCode.noop:
- logging.debug("No-op msg received.")
+ self._noop_pending = False
+ trace.debug("No-op msg received.")
else:
- logging.warning("Ignoring message with unrecognized 'opcode' value: '%s'"
+ log.warning("Ignoring message with unrecognized 'opcode' value: '%s'"
% opcode)
def _handleAgentLocateMsg( self, msg, cmap, props, version, direct ):
"""
Process a received agent-locate message
"""
- logging.debug("_handleAgentLocateMsg")
+ trace.debug("_handleAgentLocateMsg")
reply = False
if props.get("method") == "request":
@@ -703,21 +677,21 @@ class Agent(Thread):
m.correlation_id = msg.correlation_id
self._send_reply(m, msg.reply_to)
else:
- logging.debug("agent-locate msg not mine - no reply sent")
+ trace.debug("agent-locate msg not mine - no reply sent")
def _handleQueryMsg(self, msg, cmap, props, version, _direct ):
"""
Handle received query message
"""
- logging.debug("_handleQueryMsg")
+ trace.debug("_handleQueryMsg")
if "method" in props and props["method"] == "request":
if cmap:
try:
query = QmfQuery.from_map(cmap)
except TypeError:
- logging.error("Invalid Query format: '%s'" % str(cmap))
+ log.error("Invalid Query format: '%s'" % str(cmap))
return
target = query.get_target()
if target == QmfQuery.TARGET_PACKAGES:
@@ -727,13 +701,13 @@ class Agent(Thread):
elif target == QmfQuery.TARGET_SCHEMA:
self._querySchemaReply( msg, query)
elif target == QmfQuery.TARGET_AGENT:
- logging.warning("!!! @todo: Query TARGET=AGENT TBD !!!")
+ log.warning("!!! @todo: Query TARGET=AGENT TBD !!!")
elif target == QmfQuery.TARGET_OBJECT_ID:
self._queryDataReply(msg, query, _idOnly=True)
elif target == QmfQuery.TARGET_OBJECT:
self._queryDataReply(msg, query)
else:
- logging.warning("Unrecognized query target: '%s'" % str(target))
+ log.warning("Unrecognized query target: '%s'" % str(target))
@@ -744,7 +718,7 @@ class Agent(Thread):
if "method" in props and props["method"] == "request":
mname = cmap.get(SchemaMethod.KEY_NAME)
if not mname:
- logging.warning("Invalid method call from '%s': no name"
+ log.warning("Invalid method call from '%s': no name"
% msg.reply_to)
return
@@ -801,7 +775,7 @@ class Agent(Thread):
try:
query = QmfQuery.from_map(query_map)
except TypeError:
- logging.warning("Invalid query for subscription: %s" %
+ log.warning("Invalid query for subscription: %s" %
str(query_map))
return
@@ -815,7 +789,7 @@ class Agent(Thread):
# self._work_q.put(WorkItem(WorkItem.SUBSCRIBE_REQUEST,
# msg.correlation_id, param))
# self._work_q_put = True
- logging.error("External Subscription TBD")
+ log.error("External Subscription TBD")
return
# validate the query - only specific objects, or
@@ -823,7 +797,7 @@ class Agent(Thread):
if (query.get_target() != QmfQuery.TARGET_OBJECT or
(query.get_selector() == QmfQuery.PREDICATE and
query.get_predicate())):
- logging.error("Subscriptions only support (wildcard) Object"
+ log.error("Subscriptions only support (wildcard) Object"
" Queries.")
err = QmfData.create(
{"reason": "Unsupported Query type for subscription.",
@@ -846,7 +820,7 @@ class Agent(Thread):
elif duration < self._min_duration:
duration = self._min_duration
except:
- logging.warning("Bad duration value: %s" % str(msg))
+ log.warning("Bad duration value: %s" % str(msg))
duration = self._default_duration
if interval is None:
@@ -857,7 +831,7 @@ class Agent(Thread):
if interval < self._min_interval:
interval = self._min_interval
except:
- logging.warning("Bad interval value: %s" % str(msg))
+ log.warning("Bad interval value: %s" % str(msg))
interval = self._default_interval
ss = _SubscriptionState(msg.reply_to,
@@ -894,7 +868,7 @@ class Agent(Thread):
if props.get("method") == "request":
sid = cmap.get("_subscription_id")
if not sid:
- logging.error("Invalid subscription refresh msg: %s" %
+ log.error("Invalid subscription refresh msg: %s" %
str(msg))
return
@@ -902,7 +876,7 @@ class Agent(Thread):
try:
ss = self._subscriptions.get(sid)
if not ss:
- logging.error("Ignoring unknown subscription: %s" %
+ log.error("Ignoring unknown subscription: %s" %
str(sid))
return
duration = cmap.get("_duration")
@@ -914,7 +888,7 @@ class Agent(Thread):
elif duration < self._min_duration:
duration = self._min_duration
except:
- logging.error("Bad duration value: %s" % str(msg))
+ log.error("Bad duration value: %s" % str(msg))
duration = None # use existing duration
ss.resubscribe(datetime.datetime.utcnow(), duration)
@@ -944,16 +918,19 @@ class Agent(Thread):
if props.get("method") == "request":
sid = cmap.get("_subscription_id")
if not sid:
- logging.warning("No subscription id supplied: %s" % msg)
+ log.warning("No subscription id supplied: %s" % msg)
return
self._lock.acquire()
try:
if sid in self._subscriptions:
+ dead_sub = self._subscriptions[sid]
del self._subscriptions[sid]
finally:
self._lock.release()
+ self._unpublish(dead_sub)
+
def _queryPackagesReply(self, msg, query):
"""
@@ -1100,6 +1077,70 @@ class Agent(Thread):
return data_objs
+ def _publish(self, sub):
+ """ Publish a subscription.
+ """
+ response = []
+ now = datetime.datetime.utcnow()
+ objs = self._queryData(sub.query)
+ if objs:
+ for obj in objs:
+ if sub.id not in obj._subscriptions:
+ # new to subscription - publish it
+ obj._subscriptions[sub.id] = sub
+ response.append(obj.map_encode())
+ elif obj._dtime:
+ # obj._dtime is millisec since utc. Convert to datetime
+ utcdt = datetime.datetime.utcfromtimestamp(obj._dtime/1000.0)
+ if utcdt > sub.last_update:
+ response.append(obj.map_encode())
+ else:
+ # obj._utime is millisec since utc. Convert to datetime
+ utcdt = datetime.datetime.utcfromtimestamp(obj._utime/1000.0)
+ if utcdt > sub.last_update:
+ response.append(obj.map_encode())
+
+ if response:
+ trace.debug("!!! %s publishing %s!!!" % (self.name, sub.correlation_id))
+ self._send_query_response( ContentType.data,
+ sub.correlation_id,
+ sub.reply_to,
+ response)
+ sub.published(now)
+
+ def _unpublish(self, sub):
+ """ This subscription is about to be deleted, remove it from any
+ referencing objects.
+ """
+ objs = self._queryData(sub.query)
+ if objs:
+ for obj in objs:
+ if sub.id in obj._subscriptions:
+ del obj._subscriptions[sub.id]
+
+
+
+ def _wake_thread(self):
+ """
+ Make the agent management thread loop wakeup from its next_receiver
+ sleep.
+ """
+ self._lock.acquire()
+ try:
+ if not self._noop_pending:
+ trace.debug("Sending noop to wake up [%s]" % self._address)
+ msg = Message(id=QMF_APP_ID,
+ subject=self.name,
+ properties={"method":"indication",
+ "qmf.opcode":OpCode.noop},
+ content={})
+ try:
+ self._direct_sender.send( msg, sync=True )
+ self._noop_pending = True
+ except SendError, e:
+ log.error(str(e))
+ finally:
+ self._lock.release()
##==============================================================================
@@ -1115,7 +1156,7 @@ class AgentExternal(Agent):
super(AgentExternal, self).__init__(name, _domain, _notifier,
_heartbeat_interval,
_max_msg_size, _capacity)
- logging.error("AgentExternal TBD")
+ log.error("AgentExternal TBD")
@@ -1164,6 +1205,7 @@ class QmfAgentData(QmfData):
self._agent = agent
self._validated = False
self._modified = True
+ self._subscriptions = {}
def destroy(self):
self._dtime = long(time.time() * 1000)
@@ -1175,7 +1217,8 @@ class QmfAgentData(QmfData):
def set_value(self, _name, _value, _subType=None):
super(QmfAgentData, self).set_value(_name, _value, _subType)
- self._touch()
+ self._utime = long(time.time() * 1000)
+ self._touch(_name)
# @todo: publish change
def inc_value(self, name, delta=1):
@@ -1191,8 +1234,12 @@ class QmfAgentData(QmfData):
def dec_value(self, name, delta=1):
""" subtract the delta from the property """
# @todo: need to take write-lock
- logging.error(" TBD!!!")
- self._touch()
+ val = self.get_value(name)
+ try:
+ val -= delta
+ except:
+ raise
+ self.set_value(name, val)
def validate(self):
"""
@@ -1212,12 +1259,32 @@ class QmfAgentData(QmfData):
raise Exception("Required property '%s' not present." % name)
self._validated = True
- def _touch(self):
+ def _touch(self, field=None):
"""
Mark this object as modified. Used to force a publish of this object
if on subscription.
"""
- self._modified = True
+ now = datetime.datetime.utcnow()
+ publish = False
+ if field:
+ # if the named field is not continuous, mark any subscriptions as
+ # needing to be published.
+ sid = self.get_schema_class_id()
+ if sid:
+ self._agent._lock.acquire()
+ try:
+ schema = self._agent._schema.get(sid)
+ if schema:
+ prop = schema.get_property(field)
+ if prop and not prop.is_continuous():
+ for sid,sub in self._subscriptions.iteritems():
+ sub.next_update = now
+ publish = True
+ if publish:
+ self._agent._next_subscribe_event = None
+ self._agent._wake_thread()
+ finally:
+ self._agent._lock.release()
@@ -1228,6 +1295,7 @@ class QmfAgentData(QmfData):
if __name__ == '__main__':
# static test cases - no message passing, just exercise API
+ import logging
from common import (AgentName, SchemaProperty, qmfTypes, SchemaEventClass)
logging.getLogger().setLevel(logging.INFO)
diff --git a/qpid/extras/qmf/src/py/qmf2/common.py b/qpid/extras/qmf/src/py/qmf2/common.py
index 8070add806..b3352b750c 100644
--- a/qpid/extras/qmf/src/py/qmf2/common.py
+++ b/qpid/extras/qmf/src/py/qmf2/common.py
@@ -620,208 +620,9 @@ class QmfEvent(QmfData):
-
-
-#==============================================================================
-#==============================================================================
-#==============================================================================
-
-
-
-
-class Arguments(object):
- def __init__(self, map):
- pass
-# self.map = map
-# self._by_hash = {}
-# key_count = self.map.keyCount()
-# a = 0
-# while a < key_count:
-# self._by_hash[self.map.key(a)] = self.by_key(self.map.key(a))
-# a += 1
-
-
-# def __getitem__(self, key):
-# return self._by_hash[key]
-
-
-# def __setitem__(self, key, value):
-# self._by_hash[key] = value
-# self.set(key, value)
-
-
-# def __iter__(self):
-# return self._by_hash.__iter__
-
-
-# def __getattr__(self, name):
-# if name in self._by_hash:
-# return self._by_hash[name]
-# return super.__getattr__(self, name)
-
-
-# def __setattr__(self, name, value):
-# #
-# # ignore local data members
-# #
-# if (name[0] == '_' or
-# name == 'map'):
-# return super.__setattr__(self, name, value)
-
-# if name in self._by_hash:
-# self._by_hash[name] = value
-# return self.set(name, value)
-
-# return super.__setattr__(self, name, value)
-
-
-# def by_key(self, key):
-# val = self.map.byKey(key)
-# vType = val.getType()
-# if vType == TYPE_UINT8: return val.asUint()
-# elif vType == TYPE_UINT16: return val.asUint()
-# elif vType == TYPE_UINT32: return val.asUint()
-# elif vType == TYPE_UINT64: return val.asUint64()
-# elif vType == TYPE_SSTR: return val.asString()
-# elif vType == TYPE_LSTR: return val.asString()
-# elif vType == TYPE_ABSTIME: return val.asInt64()
-# elif vType == TYPE_DELTATIME: return val.asUint64()
-# elif vType == TYPE_REF: return ObjectId(val.asObjectId())
-# elif vType == TYPE_BOOL: return val.asBool()
-# elif vType == TYPE_FLOAT: return val.asFloat()
-# elif vType == TYPE_DOUBLE: return val.asDouble()
-# elif vType == TYPE_UUID: return val.asUuid()
-# elif vType == TYPE_INT8: return val.asInt()
-# elif vType == TYPE_INT16: return val.asInt()
-# elif vType == TYPE_INT32: return val.asInt()
-# elif vType == TYPE_INT64: return val.asInt64()
-# else:
-# # when TYPE_MAP
-# # when TYPE_OBJECT
-# # when TYPE_LIST
-# # when TYPE_ARRAY
-# logging.error( "Unsupported Type for Get? '%s'" % str(val.getType()))
-# return None
-
-
-# def set(self, key, value):
-# val = self.map.byKey(key)
-# vType = val.getType()
-# if vType == TYPE_UINT8: return val.setUint(value)
-# elif vType == TYPE_UINT16: return val.setUint(value)
-# elif vType == TYPE_UINT32: return val.setUint(value)
-# elif vType == TYPE_UINT64: return val.setUint64(value)
-# elif vType == TYPE_SSTR:
-# if value:
-# return val.setString(value)
-# else:
-# return val.setString('')
-# elif vType == TYPE_LSTR:
-# if value:
-# return val.setString(value)
-# else:
-# return val.setString('')
-# elif vType == TYPE_ABSTIME: return val.setInt64(value)
-# elif vType == TYPE_DELTATIME: return val.setUint64(value)
-# elif vType == TYPE_REF: return val.setObjectId(value.impl)
-# elif vType == TYPE_BOOL: return val.setBool(value)
-# elif vType == TYPE_FLOAT: return val.setFloat(value)
-# elif vType == TYPE_DOUBLE: return val.setDouble(value)
-# elif vType == TYPE_UUID: return val.setUuid(value)
-# elif vType == TYPE_INT8: return val.setInt(value)
-# elif vType == TYPE_INT16: return val.setInt(value)
-# elif vType == TYPE_INT32: return val.setInt(value)
-# elif vType == TYPE_INT64: return val.setInt64(value)
-# else:
-# # when TYPE_MAP
-# # when TYPE_OBJECT
-# # when TYPE_LIST
-# # when TYPE_ARRAY
-# logging.error("Unsupported Type for Set? '%s'" % str(val.getType()))
-# return None
-
-
-
-#class MethodResponse(object):
-# def __init__(self, impl):
-# pass
-# self.impl = qmfengine.MethodResponse(impl)
-
-
-# def status(self):
-# return self.impl.getStatus()
-
-
-# def exception(self):
-# return self.impl.getException()
-
-
-# def text(self):
-# return exception().asString()
-
-
-# def args(self):
-# return Arguments(self.impl.getArgs())
-
-
-# def __getattr__(self, name):
-# myArgs = self.args()
-# return myArgs.__getattr__(name)
-
-
-# def __setattr__(self, name, value):
-# if name == 'impl':
-# return super.__setattr__(self, name, value)
-
-# myArgs = self.args()
-# return myArgs.__setattr__(name, value)
-
-
-
-# ##==============================================================================
-# ## QUERY
-# ##==============================================================================
-
-
-
-# def _doQuery(predicate, params ):
-# """
-# Given the predicate from a query, and a map of named parameters, apply the predicate
-# to the parameters, and return True or False.
-# """
-# if type(predicate) != list or len(predicate) < 1:
-# return False
-
-# elif opr == Query._LOGIC_AND:
-# logging.debug("_doQuery() AND: [%s]" % predicate )
-# rc = False
-# for exp in predicate[1:]:
-# rc = _doQuery( exp, params )
-# if not rc:
-# break
-# return rc
-
-# elif opr == Query._LOGIC_OR:
-# logging.debug("_doQuery() OR: [%s]" % predicate )
-# rc = False
-# for exp in predicate[1:]:
-# rc = _doQuery( exp, params )
-# if rc:
-# break
-# return rc
-
-# elif opr == Query._LOGIC_NOT:
-# logging.debug("_doQuery() NOT: [%s]" % predicate )
-# if len(predicate) != 2:
-# logging.warning("Malformed query not-expression received: '%s'" % predicate)
-# return False
-# return not _doQuery( predicate[1:], params )
-
-
-
-# else:
-# logging.warning("Unknown query operator received: '%s'" % opr)
-# return False
+##==============================================================================
+## QUERY
+##==============================================================================
@@ -1095,7 +896,7 @@ class QmfQuery(_mapEncoder):
raise TypeError("Query expects to evaluate QmfData types.")
if not isinstance(pred, type([])):
- log_query.warning("Invalid type for predicate expression: '%s'" % str(pred))
+ log.warning("Invalid type for predicate expression: '%s'" % str(pred))
return False
# empty predicate - match all???
@@ -1140,8 +941,8 @@ class QmfQuery(_mapEncoder):
if oper == QmfQuery.EXISTS:
if len(pred) != 2:
- log_query.warning("Malformed query: 'exists' operator"
- " - bad arguments '%s'" % str(pred))
+ log.warning("Malformed query: 'exists' operator"
+ " - bad arguments '%s'" % str(pred))
return False
### Q: Should we assume "quote", or should it be explicit?
### "foo" or ["quote" "foo"]
@@ -1150,7 +951,7 @@ class QmfQuery(_mapEncoder):
try:
arg = self._fetch_pred_arg(pred[1], qmfData)
except AttributeError:
- log_query.debug("query parameter not found: '%s'" % str(pred))
+ log.warning("query parameter not found: '%s'" % str(pred))
return False
v = qmfData.has_value(arg)
log_query.debug("---> %s" % str(v))
@@ -1161,9 +962,9 @@ class QmfQuery(_mapEncoder):
QmfQuery.LE, QmfQuery.GT, QmfQuery.GE,
QmfQuery.RE_MATCH]:
if len(pred) != 3:
- log_query.warning("Malformed query: '%s' operator"
- " - requires 2 arguments '%s'" %
- (oper, str(pred)))
+ log.warning("Malformed query: '%s' operator"
+ " - requires 2 arguments '%s'" %
+ (oper, str(pred)))
return False
# @todo: support regular expression match
log_query.debug("query evaluate binary op: [%s]" % str(pred))
@@ -1171,7 +972,7 @@ class QmfQuery(_mapEncoder):
arg1 = self._fetch_pred_arg(pred[1], qmfData)
arg2 = self._fetch_pred_arg(pred[2], qmfData)
except AttributeError:
- log_query.debug("query parameter not found: '%s'" % str(pred))
+ log.warning("query parameter not found: '%s'" % str(pred))
return False
log_query.debug("query evaluate %s: %s, %s" % (oper, str(arg1), str(arg2)))
v = False
@@ -1183,11 +984,11 @@ class QmfQuery(_mapEncoder):
elif oper == QmfQuery.GT: v = arg1 > arg2
elif oper == QmfQuery.GE: v = arg1 >= arg2
except TypeError:
- log_query.warning("query comparison failed: '%s'" % str(pred))
+ log.warning("query comparison failed: '%s'" % str(pred))
log_query.debug("---> %s" % str(v))
return v
- log_query.warning("Unrecognized query operator: [%s]" % str(pred[0]))
+ log.warning("Unrecognized query operator: [%s]" % str(pred[0]))
return False
def _fetch_pred_arg(self, arg, qmfData):
@@ -1447,12 +1248,17 @@ class SchemaProperty(_mapEncoder):
map["unit"] = str, describes units used
map["min"] = int, minimum allowed value
map["max"] = int, maximun allowed value
- map["maxlen"] = int, if string type, this is the maximum length in bytes
+ map["maxlen"] = int, if string type, this is the maximum length in bytes
required to represent the longest instance of this string.
map["desc"] = str, human-readable description of this argument
map["reference"] = str, ???
map["parent_ref"] = bool, true if this property references an object in
which this object is in a child-parent relationship. Default False
+ map["continuous"] = bool, true if the value potentially changes too fast to
+ be directly monitorable. Example: fast changing statistic or random
+ number. Subscriptions to objects containing continuous data will publish
+ only on an interval basis, rather than every time the data changes. Default
+ False.
"""
__hash__ = None
_access_strings = ["RO","RW","RC"]
@@ -1479,6 +1285,7 @@ class SchemaProperty(_mapEncoder):
self._isParentRef = False
self._dir = None
self._default = None
+ self._is_continuous = False
for key, value in kwargs.items():
if key == "access":
@@ -1495,6 +1302,8 @@ class SchemaProperty(_mapEncoder):
elif key == "desc" : self._desc = value
elif key == "reference" : self._reference = value
elif key == "parent_ref" : self._isParentRef = _to_bool(value)
+ elif key == "parent_ref" : self._isParentRef = _to_bool(value)
+ elif key == "continuous" : self._is_continuous = _to_bool(value)
elif key == "dir":
value = str(value).upper()
if value not in self._dir_strings:
@@ -1503,7 +1312,7 @@ class SchemaProperty(_mapEncoder):
elif key == "default" : self._default = value
# constructor
- def _create(cls, type_code, kwargs={}):
+ def _create(cls, type_code, **kwargs):
return cls(_type_code=type_code, kwargs=kwargs)
create = classmethod(_create)
@@ -1538,6 +1347,8 @@ class SchemaProperty(_mapEncoder):
def get_default(self): return self._default
+ def is_continuous(self): return self._is_continuous
+
def map_encode(self):
"""
Return the map encoding of this schema.
@@ -1556,6 +1367,7 @@ class SchemaProperty(_mapEncoder):
_map["parent_ref"] = self._isParentRef
if self._dir: _map["dir"] = self._dir
if self._default: _map["default"] = self._default
+ if self._is_continuous: _map["continuous"] = self._is_continuous
return _map
def __repr__(self):
@@ -1568,6 +1380,7 @@ class SchemaProperty(_mapEncoder):
hasher.update(str(self._type))
hasher.update(str(self._isIndex))
hasher.update(str(self._isOptional))
+ hasher.update(str(self._is_continuous))
if self._access: hasher.update(self._access)
if self._unit: hasher.update(self._unit)
if self._desc: hasher.update(self._desc)
@@ -1575,7 +1388,6 @@ class SchemaProperty(_mapEncoder):
if self._default: hasher.update(self._default)
-
class SchemaMethod(_mapEncoder):
"""
The SchemaMethod class describes the method's structure, and contains a
diff --git a/qpid/extras/qmf/src/py/qmf2/console.py b/qpid/extras/qmf/src/py/qmf2/console.py
index afd20c3655..b62aa7342b 100644
--- a/qpid/extras/qmf/src/py/qmf2/console.py
+++ b/qpid/extras/qmf/src/py/qmf2/console.py
@@ -18,11 +18,11 @@
#
import sys
import os
-import logging
import platform
import time
import datetime
import Queue
+from logging import getLogger
from threading import Thread, Event
from threading import RLock
from threading import currentThread
@@ -41,6 +41,8 @@ from common import (QMF_APP_ID, OpCode, QmfQuery, Notifier, ContentType,
_callback_thread=None
+log = getLogger("qmf")
+trace = getLogger("qmf.console")
##==============================================================================
@@ -213,6 +215,7 @@ class _QueryMailbox(_AsyncMailbox):
Process query response messages delivered to this mailbox.
Invoked by Console Management thread only.
"""
+ trace.debug("Delivering to query mailbox (agent=%s)." % self.agent_name)
objects = reply.content
if isinstance(objects, type([])):
# convert from map to native types if needed
@@ -253,7 +256,7 @@ class _QueryMailbox(_AsyncMailbox):
self.result += objects
if not "partial" in reply.properties:
- # logging.error("QUERY COMPLETE for %s" % str(self.context))
+ # log.error("QUERY COMPLETE for %s" % str(self.context))
wi = WorkItem(WorkItem.QUERY_COMPLETE, self.context, self.result)
self.console._work_q.put(wi)
self.console._work_q_put = True
@@ -262,8 +265,7 @@ class _QueryMailbox(_AsyncMailbox):
def expire(self):
- logging.debug("ASYNC MAILBOX EXPIRED @ %s!!!" %
- datetime.datetime.utcnow())
+ trace.debug("Expiring query mailbox (agent=%s)." % self.agent_name)
# send along whatever (possibly none) has been received so far
wi = WorkItem(WorkItem.QUERY_COMPLETE, self.context, self.result)
self.console._work_q.put(wi)
@@ -291,6 +293,7 @@ class _SchemaPrefetchMailbox(_AsyncMailbox):
"""
Process schema response messages.
"""
+ trace.debug("Delivering schema mailbox (id=%s)." % self.schema_id)
done = False
schemas = reply.content
if schemas and isinstance(schemas, type([])):
@@ -309,6 +312,7 @@ class _SchemaPrefetchMailbox(_AsyncMailbox):
def expire(self):
+ trace.debug("Expiring schema mailbox (id=%s)." % self.schema_id)
self.destroy()
@@ -332,10 +336,10 @@ class _MethodMailbox(_AsyncMailbox):
Process method response messages delivered to this mailbox.
Invoked by Console Management thread only.
"""
-
+ trace.debug("Delivering to method mailbox.")
_map = reply.content
if not _map or not isinstance(_map, type({})):
- logging.error("Invalid method call reply message")
+ log.error("Invalid method call reply message")
result = None
else:
error=_map.get(SchemaMethod.KEY_ERROR)
@@ -358,8 +362,7 @@ class _MethodMailbox(_AsyncMailbox):
The mailbox expired without receiving a reply.
Invoked by the Console Management thread only.
"""
- logging.debug("ASYNC MAILBOX EXPIRED @ %s!!!" %
- datetime.datetime.utcnow())
+ trace.debug("Expiring method mailbox.")
# send along an empty response
wi = WorkItem(WorkItem.METHOD_RESPONSE, self.context, None)
self.console._work_q.put(wi)
@@ -391,30 +394,30 @@ class _SubscriptionMailbox(_AsyncMailbox):
def subscribe(self, query):
agent = self.console.get_agent(self.agent_name)
if not agent:
- logging.warning("subscribed failed - unknown agent '%s'" %
+ log.warning("subscribed failed - unknown agent '%s'" %
self.agent_name)
return False
try:
- logging.debug("Sending Subscribe to Agent (%s)" % self.agent_name)
+ trace.debug("Sending Subscribe to Agent (%s)" % self.agent_name)
agent._send_subscribe_req(query, self.get_address(), self.interval,
self.duration)
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
return False
return True
def resubscribe(self, duration):
agent = self.console.get_agent(self.agent_name)
if not agent:
- logging.warning("resubscribed failed - unknown agent '%s'" %
+ log.warning("resubscribed failed - unknown agent '%s'" %
self.agent_name)
return False
try:
- logging.debug("Sending resubscribe to Agent (%s)" % self.agent_name)
+ trace.debug("Sending resubscribe to Agent (%s)" % self.agent_name)
agent._send_resubscribe_req(self.get_address(),
self.agent_subscription_id, duration)
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
return False
return True
@@ -430,7 +433,7 @@ class _SubscriptionMailbox(_AsyncMailbox):
try:
e_map = QmfData.from_map(error)
except TypeError:
- logging.warning("Invalid QmfData map received: '%s'"
+ log.warning("Invalid QmfData map received: '%s'"
% str(error))
e_map = QmfData.create({"error":"Unknown error"})
sp = SubscribeParams(None, None, None, e_map)
@@ -456,12 +459,12 @@ class _SubscriptionMailbox(_AsyncMailbox):
# else: data indication
agent_name = msg.properties.get("qmf.agent")
if not agent_name:
- logging.warning("Ignoring data_ind - no agent name given: %s" %
+ log.warning("Ignoring data_ind - no agent name given: %s" %
msg)
return
agent = self.console.get_agent(agent_name)
if not agent:
- logging.warning("Ignoring data_ind - unknown agent '%s'" %
+ log.warning("Ignoring data_ind - unknown agent '%s'" %
agent_name)
return
@@ -625,7 +628,7 @@ class QmfConsoleData(QmfData):
contents.
"""
if _reply_handle is not None:
- logging.error(" ASYNC REFRESH TBD!!!")
+ log.error(" ASYNC REFRESH TBD!!!")
return None
assert self._agent
@@ -677,28 +680,28 @@ class QmfConsoleData(QmfData):
if _in_args:
_map[SchemaMethod.KEY_ARGUMENTS] = _in_args
- logging.debug("Sending method req to Agent (%s)" % time.time())
+ trace.debug("Sending method req to Agent (%s)" % time.time())
try:
self._agent._send_method_req(_map, cid)
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
mbox.destroy()
return None
if _reply_handle is not None:
return True
- logging.debug("Waiting for response to method req (%s)" % _timeout)
+ trace.debug("Waiting for response to method req (%s)" % _timeout)
replyMsg = mbox.fetch(_timeout)
mbox.destroy()
if not replyMsg:
- logging.debug("Agent method req wait timed-out.")
+ trace.debug("Agent method req wait timed-out.")
return None
_map = replyMsg.content
if not _map or not isinstance(_map, type({})):
- logging.error("Invalid method call reply message")
+ log.error("Invalid method call reply message")
return None
error=_map.get(SchemaMethod.KEY_ERROR)
@@ -751,7 +754,7 @@ class Agent(object):
self._packages = {} # map of {package-name:[list of class-names], } for this agent
self._subscriptions = [] # list of active standing subscriptions for this agent
self._announce_timestamp = None # datetime when last announce received
- logging.debug( "Created Agent with address: [%s]" % self._address )
+ trace.debug( "Created Agent with address: [%s]" % self._address )
def get_name(self):
@@ -768,7 +771,7 @@ class Agent(object):
if correlation_id:
msg.correlation_id = str(correlation_id)
# TRACE
- #logging.error("!!! Console %s sending to agent %s (%s)" %
+ #log.error("!!! Console %s sending to agent %s (%s)" %
# (self._console._name, self._name, str(msg)))
self._sender.send(msg)
# return handle
@@ -846,28 +849,28 @@ class Agent(object):
if _in_args:
_map[SchemaMethod.KEY_ARGUMENTS] = _in_args.copy()
- logging.debug("Sending method req to Agent (%s)" % time.time())
+ trace.debug("Sending method req to Agent (%s)" % time.time())
try:
self._send_method_req(_map, cid)
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
mbox.destroy()
return None
if _reply_handle is not None:
return True
- logging.debug("Waiting for response to method req (%s)" % _timeout)
+ trace.debug("Waiting for response to method req (%s)" % _timeout)
replyMsg = mbox.fetch(_timeout)
mbox.destroy()
if not replyMsg:
- logging.debug("Agent method req wait timed-out.")
+ trace.debug("Agent method req wait timed-out.")
return None
_map = replyMsg.content
if not _map or not isinstance(_map, type({})):
- logging.error("Invalid method call reply message")
+ log.error("Invalid method call reply message")
return None
return MethodResult(_out_args=_map.get(SchemaMethod.KEY_ARGUMENTS),
@@ -1076,10 +1079,10 @@ class Console(Thread):
@type timeout: float
@param timeout: maximum time in seconds to wait for all background threads to terminate. Default: forever.
"""
- logging.debug("Destroying Console...")
+ trace.debug("Destroying Console...")
if self._conn:
self.remove_connection(self._conn, timeout)
- logging.debug("Console Destroyed")
+ trace.debug("Console Destroyed")
def add_connection(self, conn):
"""
@@ -1103,7 +1106,7 @@ class Console(Thread):
" x-properties:"
" {type:direct}}}",
capacity=1)
- logging.debug("my direct addr=%s" % self._direct_recvr.source)
+ trace.debug("my direct addr=%s" % self._direct_recvr.source)
self._direct_sender = self._session.sender(str(self._address.get_node()) +
";{create:always,"
@@ -1111,7 +1114,7 @@ class Console(Thread):
" {type:topic,"
" x-properties:"
" {type:direct}}}")
- logging.debug("my direct sender=%s" % self._direct_sender.target)
+ trace.debug("my direct sender=%s" % self._direct_sender.target)
# for receiving "broadcast" messages from agents
default_addr = QmfAddress.topic(QmfAddress.SUBJECT_AGENT_IND + ".#",
@@ -1120,7 +1123,7 @@ class Console(Thread):
";{create:always,"
" node-properties:{type:topic}}",
capacity=1)
- logging.debug("default topic recv addr=%s" % self._topic_recvr.source)
+ trace.debug("default topic recv addr=%s" % self._topic_recvr.source)
# for sending to topic subscribers
@@ -1128,7 +1131,7 @@ class Console(Thread):
self._topic_sender = self._session.sender(str(topic_addr) +
";{create:always,"
" node-properties:{type:topic}}")
- logging.debug("default topic send addr=%s" % self._topic_sender.target)
+ trace.debug("default topic send addr=%s" % self._topic_sender.target)
#
# Now that receivers are created, fire off the receive thread...
@@ -1150,17 +1153,17 @@ class Console(Thread):
@param conn: connection previously added by add_connection()
"""
if self._conn and conn and conn != self._conn:
- logging.error( "Attempt to delete unknown connection: %s" % str(conn))
+ log.error( "Attempt to delete unknown connection: %s" % str(conn))
# tell connection thread to shutdown
self._operational = False
if self.isAlive():
# kick my thread to wake it up
self._wake_thread()
- logging.debug("waiting for console receiver thread to exit")
+ trace.debug("waiting for console receiver thread to exit")
self.join(timeout)
if self.isAlive():
- logging.error( "Console thread '%s' is hung..." % self.getName() )
+ log.error( "Console thread '%s' is hung..." % self.getName() )
self._direct_recvr.close()
self._direct_sender.close()
self._topic_recvr.close()
@@ -1168,7 +1171,7 @@ class Console(Thread):
self._session.close()
self._session = None
self._conn = None
- logging.debug("console connection removal complete")
+ trace.debug("console connection removal complete")
def get_address(self):
@@ -1219,14 +1222,14 @@ class Console(Thread):
content=query._predicate)
msg.reply_to = str(self._address)
msg.correlation_id = str(cid)
- logging.debug("Sending Agent Locate (%s)" % time.time())
+ trace.debug("Sending Agent Locate (%s)" % time.time())
# TRACE
- #logging.error("!!! Console %s sending agent locate (%s)" %
+ #log.error("!!! Console %s sending agent locate (%s)" %
# (self._name, str(msg)))
try:
self._topic_sender.send(msg)
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
mbox.destroy()
return None
@@ -1234,10 +1237,10 @@ class Console(Thread):
timeout = self._reply_timeout
new_agent = None
- logging.debug("Waiting for response to Agent Locate (%s)" % timeout)
+ trace.debug("Waiting for response to Agent Locate (%s)" % timeout)
mbox.fetch(timeout)
mbox.destroy()
- logging.debug("Agent Locate wait ended (%s)" % time.time())
+ trace.debug("Agent Locate wait ended (%s)" % time.time())
self._lock.acquire()
try:
new_agent = self._agent_map.get(name)
@@ -1288,10 +1291,10 @@ class Console(Thread):
cid = mbox.get_address()
try:
- logging.debug("Sending Query to Agent (%s)" % time.time())
+ trace.debug("Sending Query to Agent (%s)" % time.time())
agent._send_query(query, cid)
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
mbox.destroy()
return None
@@ -1302,7 +1305,7 @@ class Console(Thread):
if not _timeout:
_timeout = self._reply_timeout
- logging.debug("Waiting for response to Query (%s)" % _timeout)
+ trace.debug("Waiting for response to Query (%s)" % _timeout)
now = datetime.datetime.utcnow()
expire = now + datetime.timedelta(seconds=_timeout)
@@ -1311,7 +1314,7 @@ class Console(Thread):
_timeout = timedelta_to_secs(expire - now)
reply = mbox.fetch(_timeout)
if not reply:
- logging.debug("Query wait timed-out.")
+ trace.debug("Query wait timed-out.")
break
objects = reply.content
@@ -1383,12 +1386,12 @@ class Console(Thread):
mbox.destroy()
return None
- logging.debug("Waiting for response to subscription (%s)" % _timeout)
+ trace.debug("Waiting for response to subscription (%s)" % _timeout)
# @todo: what if mbox expires here?
sp = mbox.fetch(_timeout)
if not sp:
- logging.debug("Subscription request wait timed-out.")
+ trace.debug("Subscription request wait timed-out.")
mbox.destroy()
return None
@@ -1405,7 +1408,7 @@ class Console(Thread):
mbox = self._get_mailbox(subscription_id)
if not mbox:
- logging.warning("Subscription %s not found." % subscription_id)
+ log.warning("Subscription %s not found." % subscription_id)
return None
if isinstance(mbox, _AsyncSubscriptionMailbox):
@@ -1418,11 +1421,11 @@ class Console(Thread):
# wait for reply
- logging.debug("Waiting for response to subscription (%s)" % _timeout)
+ trace.debug("Waiting for response to subscription (%s)" % _timeout)
sp = mbox.fetch(_timeout)
if not sp:
- logging.debug("re-subscribe request wait timed-out.")
+ trace.debug("re-subscribe request wait timed-out.")
# @todo???? mbox.destroy()
return None
@@ -1439,11 +1442,11 @@ class Console(Thread):
agent = self.get_agent(mbox.agent_name)
if agent:
try:
- logging.debug("Sending UnSubscribe to Agent (%s)" % time.time())
+ trace.debug("Sending UnSubscribe to Agent (%s)" % time.time())
agent._send_unsubscribe_ind(subscription_id,
mbox.agent_subscription_id)
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
mbox.destroy()
@@ -1453,16 +1456,16 @@ class Console(Thread):
Make the console management thread loop wakeup from its next_receiver
sleep.
"""
- logging.debug("Sending noop to wake up [%s]" % self._address)
+ trace.debug("Sending noop to wake up [%s]" % self._address)
msg = Message(id=QMF_APP_ID,
subject=self._name,
- properties={"method":"request",
+ properties={"method":"indication",
"qmf.opcode":OpCode.noop},
content={})
try:
self._direct_sender.send( msg, sync=True )
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
def run(self):
@@ -1484,7 +1487,7 @@ class Console(Thread):
except Empty:
break
# TRACE:
- # logging.error("!!! Console %s: msg on %s [%s]" %
+ # log.error("!!! Console %s: msg on %s [%s]" %
# (self._name, self._topic_recvr.source, msg))
self._dispatch(msg, _direct=False)
@@ -1494,7 +1497,7 @@ class Console(Thread):
except Empty:
break
# TRACE
- #logging.error("!!! Console %s: msg on %s [%s]" %
+ #log.error("!!! Console %s: msg on %s [%s]" %
# (self._name, self._direct_recvr.source, msg))
self._dispatch(msg, _direct=True)
@@ -1506,36 +1509,37 @@ class Console(Thread):
# new stuff on work queue, kick the the application...
self._work_q_put = False
_callback_thread = currentThread()
- logging.info("Calling console notifier.indication")
+ trace.debug("Calling console notifier.indication")
self._notifier.indication()
_callback_thread = None
- if self._operational:
- # wait for a message to arrive, or an agent
- # to expire, or a mailbox requrest to time out
- now = datetime.datetime.utcnow()
- next_expire = self._next_agent_expire
- # the mailbox expire flag may be cleared by the
- # app thread(s)
- self._lock.acquire()
- try:
- if (self._next_mbox_expire and
- self._next_mbox_expire < next_expire):
- next_expire = self._next_mbox_expire
- finally:
- self._lock.release()
+ # wait for a message to arrive, or an agent
+ # to expire, or a mailbox requrest to time out
+ now = datetime.datetime.utcnow()
+ next_expire = self._next_agent_expire
- if next_expire > now:
- timeout = timedelta_to_secs(next_expire - now)
- try:
- logging.debug("waiting for next rcvr (timeout=%s)..." % timeout)
- xxx = self._session.next_receiver(timeout = timeout)
- except Empty:
- pass
+ self._lock.acquire()
+ try:
+ # the mailbox expire flag may be cleared by the
+ # app thread(s) to force an immedate mailbox scan
+ if self._next_mbox_expire is None:
+ next_expire = now
+ elif self._next_mbox_expire < next_expire:
+ next_expire = self._next_mbox_expire
+ finally:
+ self._lock.release()
+ timeout = timedelta_to_secs(next_expire - now)
+
+ if self._operational and timeout > 0.0:
+ try:
+ trace.debug("waiting for next rcvr (timeout=%s)..." % timeout)
+ self._session.next_receiver(timeout = timeout)
+ except Empty:
+ pass
- logging.debug("Shutting down Console thread")
+ trace.debug("Shutting down Console thread")
def get_objects(self,
_object_id=None,
@@ -1639,12 +1643,11 @@ class Console(Thread):
"""
PRIVATE: Process a message received from an Agent
"""
- #logging.debug( "Message received from Agent! [%s]" % msg )
- #logging.error( "Message received from Agent! [%s]" % msg )
+ trace.debug( "Message received from Agent! [%s]" % msg )
opcode = msg.properties.get("qmf.opcode")
if not opcode:
- logging.error("Ignoring unrecognized message '%s'" % msg)
+ log.error("Ignoring unrecognized message '%s'" % msg)
return
version = 2 # @todo: fix me
@@ -1672,9 +1675,9 @@ class Console(Thread):
else:
self._handle_indication_msg(msg, cmap, version, _direct)
elif opcode == OpCode.noop:
- logging.debug("No-op msg received.")
+ trace.debug("No-op msg received.")
else:
- logging.warning("Ignoring message with unrecognized 'opcode' value: '%s'" % opcode)
+ log.warning("Ignoring message with unrecognized 'opcode' value: '%s'" % opcode)
def _handle_agent_ind_msg(self, msg, cmap, version, direct):
@@ -1682,15 +1685,15 @@ class Console(Thread):
Process a received agent-ind message. This message may be a response to a
agent-locate, or it can be an unsolicited agent announce.
"""
- logging.debug("_handle_agent_ind_msg '%s' (%s)" % (msg, time.time()))
+ trace.debug("_handle_agent_ind_msg '%s' (%s)" % (msg, time.time()))
ai_map = msg.content
if not ai_map or not isinstance(ai_map, type({})):
- logging.warning("Bad agent-ind message received: '%s'" % msg)
+ log.warning("Bad agent-ind message received: '%s'" % msg)
return
name = ai_map.get("_name")
if not name:
- logging.warning("Bad agent-ind message received: agent name missing"
+ log.warning("Bad agent-ind message received: agent name missing"
" '%s'" % msg)
return
@@ -1724,48 +1727,48 @@ class Console(Thread):
if matched:
# unsolicited, but newly discovered
- logging.debug("AGENT_ADDED for %s (%s)" % (agent, time.time()))
+ trace.debug("AGENT_ADDED for %s (%s)" % (agent, time.time()))
wi = WorkItem(WorkItem.AGENT_ADDED, None, {"agent": agent})
self._work_q.put(wi)
self._work_q_put = True
if correlated:
# wake up all waiters
- logging.debug("waking waiters for correlation id %s" % msg.correlation_id)
+ trace.debug("waking waiters for correlation id %s" % msg.correlation_id)
mbox.deliver(msg)
def _handle_response_msg(self, msg, cmap, version, direct):
"""
Process a received data-ind message.
"""
- logging.debug("_handle_response_msg '%s' (%s)" % (msg, time.time()))
+ trace.debug("_handle_response_msg '%s' (%s)" % (msg, time.time()))
mbox = self._get_mailbox(msg.correlation_id)
if not mbox:
- logging.debug("Response msg received with unknown correlation_id"
- " msg='%s'" % str(msg))
+ log.warning("Response msg received with unknown correlation_id"
+ " msg='%s'" % str(msg))
return
# wake up all waiters
- logging.debug("waking waiters for correlation id %s" % msg.correlation_id)
+ trace.debug("waking waiters for correlation id %s" % msg.correlation_id)
mbox.deliver(msg)
def _handle_indication_msg(self, msg, cmap, version, _direct):
aname = msg.properties.get("qmf.agent")
if not aname:
- logging.debug("No agent name field in indication message.")
+ trace.debug("No agent name field in indication message.")
return
content_type = msg.properties.get("qmf.content")
if (content_type != ContentType.event or
not isinstance(msg.content, type([]))):
- logging.warning("Bad event indication message received: '%s'" % msg)
+ log.warning("Bad event indication message received: '%s'" % msg)
return
emap = msg.content[0]
if not isinstance(emap, type({})):
- logging.debug("Invalid event body in indication message: '%s'" % msg)
+ trace.debug("Invalid event body in indication message: '%s'" % msg)
return
agent = None
@@ -1775,18 +1778,18 @@ class Console(Thread):
finally:
self._lock.release()
if not agent:
- logging.debug("Agent '%s' not known." % aname)
+ trace.debug("Agent '%s' not known." % aname)
return
try:
# @todo: schema???
event = QmfEvent.from_map(emap)
except TypeError:
- logging.debug("Invalid QmfEvent map received: %s" % str(emap))
+ trace.debug("Invalid QmfEvent map received: %s" % str(emap))
return
# @todo: schema? Need to fetch it, but not from this thread!
# This thread can not pend on a request.
- logging.debug("Publishing event received from agent %s" % aname)
+ trace.debug("Publishing event received from agent %s" % aname)
wi = WorkItem(WorkItem.EVENT_RECEIVED, None,
{"agent":agent,
"event":event})
@@ -1835,12 +1838,12 @@ class Console(Thread):
next_expire_delta = lifetime_delta
self._lock.acquire()
try:
- logging.debug("!!! expiring agents '%s'" % now)
+ trace.debug("!!! expiring agents '%s'" % now)
for agent in self._agent_map.itervalues():
if agent._announce_timestamp:
agent_deathtime = agent._announce_timestamp + lifetime_delta
if agent_deathtime <= now:
- logging.debug("AGENT_DELETED for %s" % agent)
+ trace.debug("AGENT_DELETED for %s" % agent)
agent._announce_timestamp = None
wi = WorkItem(WorkItem.AGENT_DELETED, None,
{"agent":agent})
@@ -1852,7 +1855,7 @@ class Console(Thread):
next_expire_delta = agent_deathtime - now
self._next_agent_expire = now + next_expire_delta
- logging.debug("!!! next expire cycle = '%s'" % self._next_agent_expire)
+ trace.debug("!!! next expire cycle = '%s'" % self._next_agent_expire)
finally:
self._lock.release()
@@ -1862,7 +1865,7 @@ class Console(Thread):
"""
Factory to create/retrieve an agent for this console
"""
- logging.debug("creating agent %s" % name)
+ trace.debug("creating agent %s" % name)
self._lock.acquire()
try:
agent = self._agent_map.get(name)
@@ -1878,9 +1881,9 @@ class Console(Thread):
" x-properties:"
" {type:direct}}}")
except:
- logging.warning("Unable to create sender for %s" % name)
+ log.warning("Unable to create sender for %s" % name)
return None
- logging.debug("created agent sender %s" % agent._sender.target)
+ trace.debug("created agent sender %s" % agent._sender.target)
self._agent_map[name] = agent
finally:
@@ -1984,11 +1987,11 @@ class Console(Thread):
if need_fetch:
mbox = _SchemaPrefetchMailbox(self, schema_id)
query = QmfQuery.create_id(QmfQuery.TARGET_SCHEMA, schema_id)
- logging.debug("Sending Schema Query to Agent (%s)" % time.time())
+ trace.debug("Sending Schema Query to Agent (%s)" % time.time())
try:
agent._send_query(query, mbox.get_address())
except SendError, e:
- logging.error(str(e))
+ log.error(str(e))
mbox.destroy()
self._lock.acquire()
try:
@@ -2041,7 +2044,7 @@ class Console(Thread):
try:
mid = long(mid)
except TypeError:
- logging.error("Invalid mailbox id: %s" % str(mid))
+ log.error("Invalid mailbox id: %s" % str(mid))
return None
self._lock.acquire()
@@ -2056,7 +2059,7 @@ class Console(Thread):
try:
mid = long(mid)
except TypeError:
- logging.error("Invalid mailbox id: %s" % str(mid))
+ log.error("Invalid mailbox id: %s" % str(mid))
return None
self._lock.acquire()
@@ -2242,36 +2245,36 @@ class Console(Thread):
# count += 1
# try:
# if self._event.kind == qmfengine.ConsoleEvent.AGENT_ADDED:
-# logging.debug("Console Event AGENT_ADDED received")
+# trace.debug("Console Event AGENT_ADDED received")
# if self._handler:
# self._handler.agent_added(AgentProxy(self._event.agent, None))
# elif self._event.kind == qmfengine.ConsoleEvent.AGENT_DELETED:
-# logging.debug("Console Event AGENT_DELETED received")
+# trace.debug("Console Event AGENT_DELETED received")
# if self._handler:
# self._handler.agent_deleted(AgentProxy(self._event.agent, None))
# elif self._event.kind == qmfengine.ConsoleEvent.NEW_PACKAGE:
-# logging.debug("Console Event NEW_PACKAGE received")
+# trace.debug("Console Event NEW_PACKAGE received")
# if self._handler:
# self._handler.new_package(self._event.name)
# elif self._event.kind == qmfengine.ConsoleEvent.NEW_CLASS:
-# logging.debug("Console Event NEW_CLASS received")
+# trace.debug("Console Event NEW_CLASS received")
# if self._handler:
# self._handler.new_class(SchemaClassKey(self._event.classKey))
# elif self._event.kind == qmfengine.ConsoleEvent.OBJECT_UPDATE:
-# logging.debug("Console Event OBJECT_UPDATE received")
+# trace.debug("Console Event OBJECT_UPDATE received")
# if self._handler:
# self._handler.object_update(ConsoleObject(None, {"impl":self._event.object}),
# self._event.hasProps, self._event.hasStats)
# elif self._event.kind == qmfengine.ConsoleEvent.EVENT_RECEIVED:
-# logging.debug("Console Event EVENT_RECEIVED received")
+# trace.debug("Console Event EVENT_RECEIVED received")
# elif self._event.kind == qmfengine.ConsoleEvent.AGENT_HEARTBEAT:
-# logging.debug("Console Event AGENT_HEARTBEAT received")
+# trace.debug("Console Event AGENT_HEARTBEAT received")
# if self._handler:
# self._handler.agent_heartbeat(AgentProxy(self._event.agent, None), self._event.timestamp)
# elif self._event.kind == qmfengine.ConsoleEvent.METHOD_RESPONSE:
-# logging.debug("Console Event METHOD_RESPONSE received")
+# trace.debug("Console Event METHOD_RESPONSE received")
# else:
-# logging.debug("Console thread received unknown event: '%s'" % str(self._event.kind))
+# trace.debug("Console thread received unknown event: '%s'" % str(self._event.kind))
# except e:
# print "Exception caught in callback thread:", e
# self.impl.popEvent()
@@ -2300,17 +2303,17 @@ class Console(Thread):
# def shutdown(self):
-# logging.debug("broker.shutdown() called.")
+# trace.debug("broker.shutdown() called.")
# self.console.impl.delConnection(self.impl)
# self.conn.del_conn_handler(self)
# if self._session:
# self.impl.sessionClosed()
-# logging.debug("broker.shutdown() sessionClosed done.")
+# trace.debug("broker.shutdown() sessionClosed done.")
# self._session.destroy()
-# logging.debug("broker.shutdown() session destroy done.")
+# trace.debug("broker.shutdown() session destroy done.")
# self._session = None
# self._operational = False
-# logging.debug("broker.shutdown() done.")
+# trace.debug("broker.shutdown() done.")
# def wait_for_stable(self, timeout = None):
@@ -2343,24 +2346,24 @@ class Console(Thread):
# while valid:
# count += 1
# if self._event.kind == qmfengine.BrokerEvent.BROKER_INFO:
-# logging.debug("Broker Event BROKER_INFO received");
+# trace.debug("Broker Event BROKER_INFO received");
# elif self._event.kind == qmfengine.BrokerEvent.DECLARE_QUEUE:
-# logging.debug("Broker Event DECLARE_QUEUE received");
+# trace.debug("Broker Event DECLARE_QUEUE received");
# self.conn.impl.declareQueue(self._session.handle, self._event.name)
# elif self._event.kind == qmfengine.BrokerEvent.DELETE_QUEUE:
-# logging.debug("Broker Event DELETE_QUEUE received");
+# trace.debug("Broker Event DELETE_QUEUE received");
# self.conn.impl.deleteQueue(self._session.handle, self._event.name)
# elif self._event.kind == qmfengine.BrokerEvent.BIND:
-# logging.debug("Broker Event BIND received");
+# trace.debug("Broker Event BIND received");
# self.conn.impl.bind(self._session.handle, self._event.exchange, self._event.name, self._event.bindingKey)
# elif self._event.kind == qmfengine.BrokerEvent.UNBIND:
-# logging.debug("Broker Event UNBIND received");
+# trace.debug("Broker Event UNBIND received");
# self.conn.impl.unbind(self._session.handle, self._event.exchange, self._event.name, self._event.bindingKey)
# elif self._event.kind == qmfengine.BrokerEvent.SETUP_COMPLETE:
-# logging.debug("Broker Event SETUP_COMPLETE received");
+# trace.debug("Broker Event SETUP_COMPLETE received");
# self.impl.startProtocol()
# elif self._event.kind == qmfengine.BrokerEvent.STABLE:
-# logging.debug("Broker Event STABLE received");
+# trace.debug("Broker Event STABLE received");
# self._cv.acquire()
# try:
# self._stable = True
@@ -2387,7 +2390,7 @@ class Console(Thread):
# valid = self.impl.getXmtMessage(self._xmtMessage)
# while valid:
# count += 1
-# logging.debug("Broker: sending msg on connection")
+# trace.debug("Broker: sending msg on connection")
# self.conn.impl.sendMessage(self._session.handle, self._xmtMessage)
# self.impl.popXmt()
# valid = self.impl.getXmtMessage(self._xmtMessage)
@@ -2405,14 +2408,14 @@ class Console(Thread):
# def conn_event_connected(self):
-# logging.debug("Broker: Connection event CONNECTED")
+# trace.debug("Broker: Connection event CONNECTED")
# self._session = Session(self.conn, "qmfc-%s.%d" % (socket.gethostname(), os.getpid()), self)
# self.impl.sessionOpened(self._session.handle)
# self._do_events()
# def conn_event_disconnected(self, error):
-# logging.debug("Broker: Connection event DISCONNECTED")
+# trace.debug("Broker: Connection event DISCONNECTED")
# pass
@@ -2421,14 +2424,14 @@ class Console(Thread):
# def sess_event_session_closed(self, context, error):
-# logging.debug("Broker: Session event CLOSED")
+# trace.debug("Broker: Session event CLOSED")
# self.impl.sessionClosed()
# def sess_event_recv(self, context, message):
-# logging.debug("Broker: Session event MSG_RECV")
+# trace.debug("Broker: Session event MSG_RECV")
# if not self._operational:
-# logging.warning("Unexpected session event message received by Broker proxy: context='%s'" % str(context))
+# log.warning("Unexpected session event message received by Broker proxy: context='%s'" % str(context))
# self.impl.handleRcvMessage(message)
# self._do_events()
@@ -2446,6 +2449,7 @@ class Console(Thread):
if __name__ == '__main__':
# temp test code
+ import logging
from common import (qmfTypes, SchemaProperty)
logging.getLogger().setLevel(logging.INFO)
diff --git a/qpid/extras/qmf/src/py/qmf2/tests/subscriptions.py b/qpid/extras/qmf/src/py/qmf2/tests/subscriptions.py
index 750952df46..1f73865f30 100644
--- a/qpid/extras/qmf/src/py/qmf2/tests/subscriptions.py
+++ b/qpid/extras/qmf/src/py/qmf2/tests/subscriptions.py
@@ -75,7 +75,13 @@ class _agentApp(Thread):
_object_id_names=["key"] )
_schema.add_property( "key", SchemaProperty(qmfTypes.TYPE_LSTR))
- _schema.add_property( "count1", SchemaProperty(qmfTypes.TYPE_UINT32))
+
+ # note: count1 is continuous, count2 is not
+ count1_prop = SchemaProperty.create(qmfTypes.TYPE_UINT32,
+ continuous=True)
+ _schema.add_property( "count1", count1_prop)
+ count2_prop = SchemaProperty.create(qmfTypes.TYPE_UINT32,
+ continuous=False)
_schema.add_property( "count2", SchemaProperty(qmfTypes.TYPE_UINT32))
self.agent.register_object_class(_schema)
@@ -224,7 +230,7 @@ class BaseTest(unittest.TestCase):
# create console
# find all agents
# subscribe to changes to any object in package1/class1
- # should succeed
+ # should succeed - verify 1 publish
self.notifier = _testNotifier()
self.console = qmf2.console.Console(notifier=self.notifier,
agent_timeout=3)
@@ -288,10 +294,10 @@ class BaseTest(unittest.TestCase):
wi = self.console.get_next_workitem(timeout=0)
- # for now, I expect 5 publish per subscription
- self.assertTrue(r_count == 5 * len(subscriptions))
+ # expect 1 publish per subscription
+ self.assertTrue(r_count == 5)
for ii in range(len(subscriptions)):
- self.assertTrue(subscriptions[ii][1] == 5)
+ self.assertTrue(subscriptions[ii][1] == 1)
self.console.destroy(10)
@@ -349,21 +355,17 @@ class BaseTest(unittest.TestCase):
self.assertTrue(len(reply) == 1)
self.assertTrue(isinstance(reply[0], QmfData))
self.assertTrue(reply[0].get_object_id() == "undesc-2")
- # print("!!! get_params() = %s" % wi.get_params())
self.assertTrue(wi.get_handle() < len(subscriptions))
subscriptions[wi.get_handle()][1] += 1
- # self.assertTrue(isinstance(reply, qmf2.console.MethodResult))
- # self.assertTrue(reply.succeeded())
- # self.assertTrue(reply.get_argument("cookie") ==
- # wi.get_handle())
+
self.console.release_workitem(wi)
wi = self.console.get_next_workitem(timeout=0)
- # for now, I expect 5 publish per subscription
- self.assertTrue(r_count == 5 * len(subscriptions))
- #for ii in range(len(subscriptions)):
- # self.assertTrue(subscriptions[ii][1] == 5)
+ # expect 1 publish per subscription
+ self.assertTrue(r_count == 5)
+ for ii in range(len(subscriptions)):
+ self.assertTrue(subscriptions[ii][1] == 1)
self.console.destroy(10)
@@ -426,18 +428,15 @@ class BaseTest(unittest.TestCase):
self.assertTrue(sid.get_class_name() == "class1")
self.assertTrue(wi.get_handle() < len(subscriptions))
subscriptions[wi.get_handle()][1] += 1
- # self.assertTrue(isinstance(reply, qmf2.console.MethodResult))
- # self.assertTrue(reply.succeeded())
- # self.assertTrue(reply.get_argument("cookie") ==
- # wi.get_handle())
+
self.console.release_workitem(wi)
wi = self.console.get_next_workitem(timeout=0)
- # for now, I expect 5 publish per subscription
- self.assertTrue(r_count == 5 * len(subscriptions))
- #for ii in range(len(subscriptions)):
- # self.assertTrue(subscriptions[ii][1] == 5)
+ # expect 1 publish per subscription
+ self.assertTrue(r_count == 5)
+ for ii in range(len(subscriptions)):
+ self.assertTrue(subscriptions[ii][1] == 1)
self.console.destroy(10)
@@ -459,9 +458,9 @@ class BaseTest(unittest.TestCase):
self.conn.connect()
self.console.add_connection(self.conn)
- # query to match object "p2c1_key2" in schema package2/class1
- sid = SchemaClassId.create("package2", "class1")
- query = QmfQuery.create_id_object("p2c1_key2", sid)
+ # query to match object "p1c1_key2" in schema package1/class1
+ sid = SchemaClassId.create("package1", "class1")
+ query = QmfQuery.create_id_object("p1c1_key2", sid)
agent_app = self.agents[0]
aname = agent_app.agent.get_name()
@@ -489,13 +488,20 @@ class BaseTest(unittest.TestCase):
self.assertTrue(isinstance(reply, type([])))
self.assertTrue(len(reply) == 1)
self.assertTrue(isinstance(reply[0], QmfData))
- self.assertTrue(reply[0].get_object_id() == "p2c1_key2")
+ self.assertTrue(reply[0].get_object_id() == "p1c1_key2")
sid = reply[0].get_schema_class_id()
self.assertTrue(isinstance(sid, SchemaClassId))
- self.assertTrue(sid.get_package_name() == "package2")
+ self.assertTrue(sid.get_package_name() == "package1")
self.assertTrue(sid.get_class_name() == "class1")
self.assertTrue(wi.get_handle() == "my-handle")
+ # count1 is continuous, touching it will force a
+ # publish on the interval
+ self.assertTrue(sid is not None)
+ test_obj = agent_app.agent.get_object("p1c1_key2", sid)
+ self.assertTrue(test_obj is not None)
+ test_obj.set_value("count1", r_count)
+
self.console.release_workitem(wi)
if r_count == 3:
@@ -504,11 +510,8 @@ class BaseTest(unittest.TestCase):
wi = self.console.get_next_workitem(timeout=0)
- # for now, I expect 5 publish per subscription
+ # expect 5 publish per subscription, more if refreshed
self.assertTrue(r_count > 5)
- # print("!!! total r_count=%d" % r_count)
- #for ii in range(len(subscriptions)):
- # self.assertTrue(subscriptions[ii][1] == 5)
self.console.destroy(10)
@@ -530,9 +533,9 @@ class BaseTest(unittest.TestCase):
self.conn.connect()
self.console.add_connection(self.conn)
- # query to match object "p2c1_key2" in schema package2/class1
- sid = SchemaClassId.create("package2", "class1")
- query = QmfQuery.create_id_object("p2c1_key2", sid)
+ # query to match object "p1c1_key2" in schema package1/class1
+ sid = SchemaClassId.create("package1", "class1")
+ query = QmfQuery.create_id_object("p1c1_key2", sid)
agent_app = self.agents[0]
aname = agent_app.agent.get_name()
@@ -560,13 +563,20 @@ class BaseTest(unittest.TestCase):
self.assertTrue(isinstance(reply, type([])))
self.assertTrue(len(reply) == 1)
self.assertTrue(isinstance(reply[0], QmfData))
- self.assertTrue(reply[0].get_object_id() == "p2c1_key2")
+ self.assertTrue(reply[0].get_object_id() == "p1c1_key2")
sid = reply[0].get_schema_class_id()
self.assertTrue(isinstance(sid, SchemaClassId))
- self.assertTrue(sid.get_package_name() == "package2")
+ self.assertTrue(sid.get_package_name() == "package1")
self.assertTrue(sid.get_class_name() == "class1")
self.assertTrue(wi.get_handle() == "my-handle")
+ # count1 is continuous, touching it will force a
+ # publish on the interval
+ self.assertTrue(sid is not None)
+ test_obj = agent_app.agent.get_object("p1c1_key2", sid)
+ self.assertTrue(test_obj is not None)
+ test_obj.set_value("count1", r_count)
+
self.console.release_workitem(wi)
if r_count == 3:
@@ -574,10 +584,8 @@ class BaseTest(unittest.TestCase):
wi = self.console.get_next_workitem(timeout=0)
- # for now, I expect 5 publish per subscription full duration
- self.assertTrue(r_count < 5)
- #for ii in range(len(subscriptions)):
- # self.assertTrue(subscriptions[ii][1] == 5)
+ # expect only 3 publish received before cancel
+ self.assertTrue(r_count == 3)
self.console.destroy(10)
@@ -645,8 +653,8 @@ class BaseTest(unittest.TestCase):
wi = self.console.get_next_workitem(timeout=0)
- # for now, I expect 5 publish per subscription
- self.assertTrue(r_count == 6)
+ # one response + one publish = 2
+ self.assertTrue(r_count == 2)
self.console.destroy(10)
@@ -665,9 +673,9 @@ class BaseTest(unittest.TestCase):
self.conn.connect()
self.console.add_connection(self.conn)
- # query to match object "p2c1_key2" in schema package2/class1
- sid = SchemaClassId.create("package2", "class1")
- query = QmfQuery.create_id_object("p2c1_key2", sid)
+ # query to match object "p1c1_key2" in schema package1/class1
+ sid = SchemaClassId.create("package1", "class1")
+ query = QmfQuery.create_id_object("p1c1_key2", sid)
agent_app = self.agents[0]
aname = agent_app.agent.get_name()
@@ -685,6 +693,7 @@ class BaseTest(unittest.TestCase):
# refresh after three subscribe indications, count all
# indications to verify refresh worked
r_count = 0
+ i_count = 0
sp = None
rp = None
while self.notifier.wait_for_work(4):
@@ -706,20 +715,28 @@ class BaseTest(unittest.TestCase):
else:
self.assertTrue(wi.get_type() ==
WorkItem.SUBSCRIBE_INDICATION)
+ i_count += 1
# sp better be set up by now!
self.assertTrue(isinstance(sp, qmf2.console.SubscribeParams))
reply = wi.get_params()
self.assertTrue(isinstance(reply, type([])))
self.assertTrue(len(reply) == 1)
self.assertTrue(isinstance(reply[0], QmfData))
- self.assertTrue(reply[0].get_object_id() == "p2c1_key2")
+ self.assertTrue(reply[0].get_object_id() == "p1c1_key2")
sid = reply[0].get_schema_class_id()
self.assertTrue(isinstance(sid, SchemaClassId))
- self.assertTrue(sid.get_package_name() == "package2")
+ self.assertTrue(sid.get_package_name() == "package1")
self.assertTrue(sid.get_class_name() == "class1")
self.assertTrue(wi.get_handle() == "my-handle")
- if r_count == 4: # + 1 for subscribe reply
+ # count1 is continuous, touching it will force a
+ # publish on the interval
+ self.assertTrue(sid is not None)
+ test_obj = agent_app.agent.get_object("p1c1_key2", sid)
+ self.assertTrue(test_obj is not None)
+ test_obj.set_value("count1", r_count)
+
+ if r_count == 4: # 3 data + 1 subscribe reply
rp = self.console.refresh_subscription(sp.get_subscription_id())
self.assertTrue(rp)
@@ -727,8 +744,9 @@ class BaseTest(unittest.TestCase):
wi = self.console.get_next_workitem(timeout=0)
- # for now, I expect 5 publish per subscription, + 2 replys
- self.assertTrue(r_count > 7)
+ # expect 5 publish per subscription, more if refreshed
+ self.assertTrue(sp is not None and rp is not None)
+ self.assertTrue(i_count > 5)
self.console.destroy(10)
@@ -748,9 +766,9 @@ class BaseTest(unittest.TestCase):
self.conn.connect()
self.console.add_connection(self.conn)
- # query to match object "p2c1_key2" in schema package2/class1
- sid = SchemaClassId.create("package2", "class1")
- query = QmfQuery.create_id_object("p2c1_key2", sid)
+ # query to match object "p1c1_key2" in schema package1/class1
+ sid = SchemaClassId.create("package1", "class1")
+ query = QmfQuery.create_id_object("p1c1_key2", sid)
agent_app = self.agents[0]
aname = agent_app.agent.get_name()
@@ -765,8 +783,6 @@ class BaseTest(unittest.TestCase):
_blocking=False)
self.assertTrue(rc)
- # refresh after three subscribe indications, count all
- # indications to verify refresh worked
r_count = 0
sp = None
rp = None
@@ -789,20 +805,220 @@ class BaseTest(unittest.TestCase):
self.assertTrue(isinstance(reply, type([])))
self.assertTrue(len(reply) == 1)
self.assertTrue(isinstance(reply[0], QmfData))
- self.assertTrue(reply[0].get_object_id() == "p2c1_key2")
+ self.assertTrue(reply[0].get_object_id() == "p1c1_key2")
sid = reply[0].get_schema_class_id()
self.assertTrue(isinstance(sid, SchemaClassId))
- self.assertTrue(sid.get_package_name() == "package2")
+ self.assertTrue(sid.get_package_name() == "package1")
self.assertTrue(sid.get_class_name() == "class1")
self.assertTrue(wi.get_handle() == "my-handle")
+ # count1 is continuous, touching it will force a
+ # publish on the interval
+ self.assertTrue(sid is not None)
+ test_obj = agent_app.agent.get_object("p1c1_key2", sid)
+ self.assertTrue(test_obj is not None)
+ test_obj.set_value("count1", r_count)
+
+ if r_count == 3:
self.console.cancel_subscription(sp.get_subscription_id())
self.console.release_workitem(wi)
wi = self.console.get_next_workitem(timeout=0)
- # for now, I expect 1 subscribe reply and 1 data_indication
- self.assertTrue(r_count == 2)
+ # expect cancel after 3 replies
+ self.assertTrue(r_count == 3)
+
+ self.console.destroy(10)
+
+
+
+
+ def test_sync_periodic_publish_continuous(self):
+ # create console
+ # find all agents
+ # subscribe to changes to any object in package1/class1
+ # should succeed - verify 1 publish
+ # Change continuous property on each publish,
+ # should only see 1 publish per interval
+ self.notifier = _testNotifier()
+ self.console = qmf2.console.Console(notifier=self.notifier,
+ agent_timeout=3)
+ self.conn = qpid.messaging.Connection(self.broker.host,
+ self.broker.port,
+ self.broker.user,
+ self.broker.password)
+ self.conn.connect()
+ self.console.add_connection(self.conn)
+
+ subscriptions = []
+ index = 0
+
+ # query to match all objects in schema package1/class1
+ sid = SchemaClassId.create("package1", "class1")
+ t_params = {QmfData.KEY_SCHEMA_ID: sid}
+ query = QmfQuery.create_wildcard(QmfQuery.TARGET_OBJECT,
+ _target_params=t_params)
+ # find an agent
+ agent_app = self.agents[0]
+ aname = agent_app.agent.get_name()
+ agent = self.console.find_agent(aname, timeout=3)
+ self.assertTrue(agent and agent.get_name() == aname)
+
+ # setup subscription on agent
+
+ sp = self.console.create_subscription(agent,
+ query,
+ "some-handle")
+ self.assertTrue(isinstance(sp, qmf2.console.SubscribeParams))
+ self.assertTrue(sp.succeeded())
+ self.assertTrue(sp.get_error() == None)
+ self.assertTrue(sp.get_duration() == 10)
+ self.assertTrue(sp.get_publish_interval() == 2)
+
+ # now wait for the (2 * interval) and count the updates
+ r_count = 0
+ sid = None
+ while self.notifier.wait_for_work(4):
+ wi = self.console.get_next_workitem(timeout=0)
+ while wi is not None:
+ r_count += 1
+ self.assertTrue(wi.get_type() == WorkItem.SUBSCRIBE_INDICATION)
+ self.assertTrue(wi.get_handle() == "some-handle")
+ if r_count == 1:
+ # first indication - returns all matching objects
+ reply = wi.get_params()
+ self.assertTrue(isinstance(reply, type([])))
+ self.assertTrue(len(reply) == 2)
+ for obj in reply:
+ self.assertTrue(isinstance(obj, QmfData))
+ self.assertTrue(obj.get_object_id() == "p1c1_key2" or
+ obj.get_object_id() == "p1c1_key1")
+ sid = obj.get_schema_class_id()
+ self.assertTrue(isinstance(sid, SchemaClassId))
+ self.assertTrue(sid.get_package_name() == "package1")
+ self.assertTrue(sid.get_class_name() == "class1")
+
+ else:
+ # verify publish of modified object only!
+ reply = wi.get_params()
+ self.assertTrue(isinstance(reply, type([])))
+ self.assertTrue(len(reply) == 1)
+ obj = reply[0]
+ self.assertTrue(isinstance(obj, QmfData))
+ self.assertTrue(obj.get_object_id() == "p1c1_key2")
+ self.assertTrue(obj.get_value("count1") == r_count - 1)
+ # fail test if we receive more than expected
+ self.assertTrue(r_count < 10)
+
+
+ # now update one of the objects!
+ self.assertTrue(sid is not None)
+ test_obj = agent_app.agent.get_object("p1c1_key2", sid)
+ self.assertTrue(test_obj is not None)
+ test_obj.set_value("count1", r_count)
+
+ self.console.release_workitem(wi)
+
+ wi = self.console.get_next_workitem(timeout=0)
+
+ # expect at most 1 publish per interval seen
+ self.assertTrue(r_count < 10)
+
+ self.console.destroy(10)
+
+
+
+
+ def test_sync_periodic_publish_noncontinuous(self):
+ # create console, find agent
+ # subscribe to changes to any object in package1/class1
+ # should succeed - verify 1 publish
+ # Change noncontinuous property on each publish,
+ # should only see 1 publish per each update
+ self.notifier = _testNotifier()
+ self.console = qmf2.console.Console(notifier=self.notifier,
+ agent_timeout=3)
+ self.conn = qpid.messaging.Connection(self.broker.host,
+ self.broker.port,
+ self.broker.user,
+ self.broker.password)
+ self.conn.connect()
+ self.console.add_connection(self.conn)
+
+ subscriptions = []
+ index = 0
+
+ # query to match all objects in schema package1/class1
+ sid = SchemaClassId.create("package1", "class1")
+ t_params = {QmfData.KEY_SCHEMA_ID: sid}
+ query = QmfQuery.create_wildcard(QmfQuery.TARGET_OBJECT,
+ _target_params=t_params)
+ # find an agent
+ agent_app = self.agents[0]
+ aname = agent_app.agent.get_name()
+ agent = self.console.find_agent(aname, timeout=3)
+ self.assertTrue(agent and agent.get_name() == aname)
+
+ # setup subscription on agent
+
+ sp = self.console.create_subscription(agent,
+ query,
+ "some-handle")
+ self.assertTrue(isinstance(sp, qmf2.console.SubscribeParams))
+ self.assertTrue(sp.succeeded())
+ self.assertTrue(sp.get_error() == None)
+ self.assertTrue(sp.get_duration() == 10)
+ self.assertTrue(sp.get_publish_interval() == 2)
+
+ # now wait for the (2 * interval) and count the updates
+ r_count = 0
+ sid = None
+ while self.notifier.wait_for_work(4):
+ wi = self.console.get_next_workitem(timeout=0)
+ while wi is not None:
+ r_count += 1
+ self.assertTrue(wi.get_type() == WorkItem.SUBSCRIBE_INDICATION)
+ self.assertTrue(wi.get_handle() == "some-handle")
+ if r_count == 1:
+ # first indication - returns all matching objects
+ reply = wi.get_params()
+ self.assertTrue(isinstance(reply, type([])))
+ self.assertTrue(len(reply) == 2)
+ for obj in reply:
+ self.assertTrue(isinstance(obj, QmfData))
+ self.assertTrue(obj.get_object_id() == "p1c1_key2" or
+ obj.get_object_id() == "p1c1_key1")
+ sid = obj.get_schema_class_id()
+ self.assertTrue(isinstance(sid, SchemaClassId))
+ self.assertTrue(sid.get_package_name() == "package1")
+ self.assertTrue(sid.get_class_name() == "class1")
+
+ else:
+ # verify publish of modified object only!
+ reply = wi.get_params()
+ self.assertTrue(isinstance(reply, type([])))
+ self.assertTrue(len(reply) == 1)
+ obj = reply[0]
+ self.assertTrue(isinstance(obj, QmfData))
+ self.assertTrue(obj.get_object_id() == "p1c1_key2")
+ self.assertTrue(obj.get_value("count2") == r_count - 1)
+ # fail test if we receive more than expected
+ self.assertTrue(r_count < 30)
+
+
+ # now update the noncontinuous field of one of the objects!
+ if r_count < 20:
+ self.assertTrue(sid is not None)
+ test_obj = agent_app.agent.get_object("p1c1_key2", sid)
+ self.assertTrue(test_obj is not None)
+ test_obj.set_value("count2", r_count)
+
+ self.console.release_workitem(wi)
+
+ wi = self.console.get_next_workitem(timeout=0)
+
+ # expect at least 1 publish per update
+ self.assertTrue(r_count > 10)
self.console.destroy(10)
diff --git a/qpid/tests/setup.py b/qpid/tests/setup.py
new file mode 100755
index 0000000000..c6f3142007
--- /dev/null
+++ b/qpid/tests/setup.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+#
+# 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.
+#
+from distutils.core import setup
+
+setup(name="qpid-tests",
+ version="0.7",
+ author="Apache Qpid",
+ author_email="dev@qpid.apache.org",
+ packages=["qpid_tests", "qpid_tests.broker_0_10", "qpid_tests.broker_0_9",
+ "qpid_tests.broker_0_8"],
+ package_dir={"": "src/py"},
+ url="http://qpid.apache.org/",
+ license="Apache Software License",
+ description="Apache Qpid conformance tests")
diff --git a/qpid/tools/src/py/qpid-stat b/qpid/tools/src/py/qpid-stat
index c6fc5ef0da..2350b5ba7c 100755
--- a/qpid/tools/src/py/qpid-stat
+++ b/qpid/tools/src/py/qpid-stat
@@ -52,6 +52,7 @@ def Usage ():
# print " -s Show Sessions"
print " -e Show Exchanges"
print " -q Show Queues"
+ print " -u Show Subscriptions"
print
print " -S [--sort-by] COLNAME Sort by column name"
print " -I [--increasing] Sort by increasing value (default = decreasing)"
@@ -103,6 +104,7 @@ class Broker(object):
self.sessions = {}
self.exchanges = {}
self.queues = {}
+ self.subscriptions = {}
package = "org.apache.qpid.broker"
list = qmf.getObjects(_class="connection", _package=package, _agent=self.brokerAgent)
@@ -123,6 +125,10 @@ class Broker(object):
for queue in list:
self.queues[queue.getObjectId()] = queue
+ list = qmf.getObjects(_class="subscription", _package=package, _agent=self.brokerAgent)
+ for subscription in list:
+ self.subscriptions[subscription.getObjectId()] = subscription
+
def getName(self):
return self.broker.getUrl()
@@ -373,12 +379,57 @@ class BrokerManager(Console):
dispRows = rows
disp.formattedTable(title, heads, dispRows)
+ def displaySubscriptions(self, subs):
+ disp = Display(prefix=" ")
+ heads = []
+ if self.cluster:
+ heads.append(Header('broker'))
+ heads.append(Header("subscription"))
+ heads.append(Header("queue"))
+ heads.append(Header("connection"))
+ heads.append(Header("processName"))
+ heads.append(Header("processId"))
+ heads.append(Header("browsing", Header.Y))
+ heads.append(Header("acknowledged", Header.Y))
+ heads.append(Header("exclusive", Header.Y))
+ heads.append(Header("creditMode"))
+ heads.append(Header("delivered", Header.KMG))
+ rows = []
+ for broker in self.brokers:
+ for oid in broker.subscriptions:
+ s = broker.subscriptions[oid]
+ row = []
+ if self.cluster:
+ row.append(broker.getName())
+ row.append(s.name)
+ row.append(self.qmf.getObjects(_objectId=s.queueRef)[0].name)
+ connectionRef = self.qmf.getObjects(_objectId=s.sessionRef)[0].connectionRef
+ row.append(self.qmf.getObjects(_objectId=connectionRef)[0].address)
+ row.append(self.qmf.getObjects(_objectId=connectionRef)[0].remoteProcessName)
+ row.append(self.qmf.getObjects(_objectId=connectionRef)[0].remotePid)
+ row.append(s.browsing)
+ row.append(s.acknowledged)
+ row.append(s.exclusive)
+ row.append(s.creditMode)
+ row.append(s.delivered)
+ rows.append(row)
+ title = "Subscriptions"
+ if self.cluster:
+ title += " for cluster '%s'" % self.cluster.clusterName
+ if _sortcol:
+ sorter = Sorter(heads, rows, _sortcol, _limit, _increasing)
+ dispRows = sorter.getSorted()
+ else:
+ dispRows = rows
+ disp.formattedTable(title, heads, dispRows)
+
def displayMain(self, main, subs):
if main == 'b': self.displayBroker(subs)
elif main == 'c': self.displayConn(subs)
elif main == 's': self.displaySession(subs)
elif main == 'e': self.displayExchange(subs)
elif main == 'q': self.displayQueue(subs)
+ elif main == 'u': self.displaySubscriptions(subs)
def display(self):
self._getCluster()
@@ -406,7 +457,7 @@ class BrokerManager(Console):
try:
longOpts = ("top", "numeric", "sort-by=", "limit=", "increasing", "timeout=")
- (optlist, encArgs) = getopt.gnu_getopt(sys.argv[1:], "bceqS:L:I", longOpts)
+ (optlist, encArgs) = getopt.gnu_getopt(sys.argv[1:], "bcequS:L:I", longOpts)
except:
Usage()
@@ -431,7 +482,7 @@ for opt in optlist:
_limit = int(opt[1])
elif len(opt[0]) == 2:
char = opt[0][1]
- if "bcseq".find(char) != -1:
+ if "bcequ".find(char) != -1:
_types += char
else:
Usage()