You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2011/03/15 02:54:18 UTC

svn commit: r1081634 [5/9] - in /qpid/branches/qpid-2920/qpid: ./ bin/ cpp/ cpp/bindings/qpid/ cpp/bindings/qpid/perl/ cpp/bindings/qpid/python/ cpp/bindings/qpid/ruby/ cpp/examples/ cpp/examples/direct/ cpp/examples/failover/ cpp/examples/fanout/ cpp/...

Added: qpid/branches/qpid-2920/qpid/doc/book/src/producer-flow-control.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/doc/book/src/producer-flow-control.xml?rev=1081634&view=auto
==============================================================================
--- qpid/branches/qpid-2920/qpid/doc/book/src/producer-flow-control.xml (added)
+++ qpid/branches/qpid-2920/qpid/doc/book/src/producer-flow-control.xml Tue Mar 15 01:54:07 2011
@@ -0,0 +1,347 @@
+<?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.
+ 
+-->
+
+<section id="producer-flow-control">
+  <title>
+    Producer Flow Control
+  </title>
+
+  <section role="h2" id="producerflowcontrol-Overview">
+    <title>
+      Overview
+    </title>
+      <para>
+	As of release 0.10, the C++ broker supports the use of flow control to
+	throttle back message producers that are at risk of overflowing a
+	destination queue.
+      </para>
+
+      <para>
+        Each queue in the C++ broker has two threshold values associated with it:
+      </para>
+
+      <para>
+        Flow Stop Threshold: this is the level of queue resource
+        utilization above which flow control will be enabled.  Once this
+        threshold is crossed, the queue is considered in danger of overflow.
+      </para>
+
+      <para>
+        Flow Resume Threshold - this is the level of queue resource utilization
+        below which flow control will be disabled.  Once this threshold is
+        crossed, the queue is no longer considered in danger of overflow.
+      </para>
+
+      <para>
+        In the above description, queue resource utilization may be
+        defined as the total count of messages currently enqueued, or the total
+        sum of all message content in bytes.
+      </para>
+
+      <para>
+        The value for a queue's Flow Stop Threshold must be greater than or
+        equal to the value of the queue's Flow Resume Threshold.
+      </para>
+
+    <section role="h3" id="producerflowcontrol-QueueThresholdsExample">
+      <title>
+	Example
+      </title>
+
+      <para>
+        Let's consider a queue with a maximum limit set on the total number of
+        messages that may be enqueued to that queue.  Assume this maximum
+        message limit is 1000 messages.  Assume also that the user configures a
+        Flow Stop Threshold of 900 messages, and a Flow Resume Threshold of 500
+        messages.  Then the following holds:
+      </para>
+
+      <para>
+        When the total number of enqueued messages is greater than or equal to
+        900, the queue's flow control state is OFF.
+      </para>
+
+      <para>
+        When the total number of enqueued messages is greater than 900, the
+        queue's flow control state transitions to ON.
+      </para>
+
+      <para>
+        When the queue's flow control state is "ON", it remains "ON" until the
+        total number of enqueued messages is less than 500.  At that point, the queue's
+        flow control state transitions to "OFF".
+      </para>
+
+      <para>
+        A similar example using total enqueued content bytes as the threshold
+        units are permitted.
+      </para>
+    </section>
+
+    <para>
+      Thresholds may be set using both total message counts and total byte
+      counts.  In this case, the following rules apply:
+    </para>
+
+    <para>
+      1) Flow control is "ON" when either stop threshold value is crossed.
+    </para>
+    <para>
+      2) Flow control remains "ON" until both resume thresholds are satisfied.
+    </para>
+
+    <section role="h3" id="producerflowcontro-MultiThresholdExample">
+      <title>
+	Example
+      </title>
+
+    <para>
+      Let's consider a queue with a maximum size limit of 10K bytes, and 5000
+      messages.  A user may assign a Flow Stop Threshold based on a total
+      message count of 4000 messages.  They may also assigne a Flow Stop
+      Threshold of 8K bytes.  The queue's flow control state transitions to
+      "ON" if either threshold is crossed: (total-msgs greater-than 4000 OR total-bytes
+      greater-than 8K).
+    </para>
+
+    <para>
+      Assume the user has assigned Flow Resume threshold's of 3000 messages and
+      6K bytes.  Then the queue's flow control will remain active until both
+      thresholds are satified: (total-msg less-than 3000 AND total-bytes less-than 6K).
+    </para>
+    </section>
+
+    <para>
+      The Broker enforces flow control by delaying the completion of the
+      Message.Transfer command that causes a message to be delivered to a queue
+      with active flow control.  The completion of the Message.Transfer command
+      is held off until flow control state transitions to "OFF" for all queues
+      that are a destination for that command.
+    </para>
+
+    <para>
+      A message producing client is permitted to have a finite number of
+      commands pending completion.  When the total number of these outstanding
+      commands reaches the limit, the client must not issue further commands
+      until one or more of the outstanding commands have completed.  This
+      window of outstanding commands is considered the sender's "capacity".
+      This allows any given producer to have a "capacity's" worth of messages
+      blocked due to flow control before the sender must stop sending further
+      messages.
+      </para>
+
+      <para>
+        This capacity window must be considered when determining a suitable
+        flow stop threshold for a given queue, as a producer may send its
+        capacity worth of messages _after_ a queue has reached the flow stop
+        threshold.  Therefore, a flow stop threshould should be set such that
+        the queue can accomodate more messages without overflowing.
+      </para>
+
+      <para>
+        For example, assume two clients, C1 and C2, are producing messages to
+        one particular destination queue.  Assume client C1 has a configured
+        capacity of 50 messages, and client C2's capacity is 15 messages.  In
+        this example, assume C1 and C2 are the only clients queuing messages to
+        a given queue.  If this queue has a Flow Stop Threshold of 100
+        messages, then, worst-case, the queue may receive up to 165 messages
+        before clients C1 and C2 are blocked from sending further messages.
+        This is due to the fact that the queue will enable flow control on
+        receipt of its 101'st message - preventing the completion of the
+        Message.Transfer command that carried the 101'st message.  However, C1
+        and C2 are allowed to have a total of 65 (50 for C1 and 15 for C2)
+        messages pending completion of Message.Transfer before they will stop
+        producing messages.  Thus, up to 65 messages may be enqueued beyond the
+        flow stop threshold before the producers will be blocked.
+      </para>
+    </section>
+
+    <section role="h2" id="producerflowcontrol-UserInterface">
+      <title>
+        User Interface
+      </title>
+
+      <para>
+        By default, the C++ broker assigns a queue's flow stop and flow resume
+        thresholds when the queue is created.  The C++ broker also allows the
+        user to manually specify the flow control thresholds on a per queue
+        basis.
+      </para>
+
+      <para>
+        However, queues that have been configured with a Limit Policy of type
+        RING or RING-STRICT do NOT have queue flow thresholds enabled by
+        default.  The nature of a RING queue defines its behavior when its
+        capacity is reach: replace the oldest message.
+      </para>
+
+      <para>
+        The flow control state of a queue can be determined by the "flowState"
+        boolean in the queue's QMF management object.  The queue's management
+        object also contains a counter that increments each time flow control
+        becomes active for the queue.
+      </para>
+
+      <para>
+        The broker applies a threshold ratio to compute a queue's default flow
+        control configuration.  These thresholds are expressed as a percentage
+        of a queue's maximum capacity.  There is one value for determining the
+        stop threshold, and another for determining the resume threshold.  The
+        user may configure these percentages using the following broker
+        configuration options:
+      </para>
+
+      <programlisting>
+        --default-flow-stop-threshold ("Queue capacity level at which flow control is activated.")
+        --default-flow-resume-threshold ("Queue capacity level at which flow control is de-activated.")
+      </programlisting>
+
+      <para>
+        For example:
+      </para>
+
+      <programlisting>
+        qpidd --default-flow-stop-threshold=90 --default-flow-resume-threshold=75
+      </programlisting>
+
+      <para>
+        Sets the default flow stop threshold to 90% of a queue's maximum
+        capacity and the flow resume threshold to 75% of the maximum capacity.
+        If a queue is created with a default-queue-limit of 10000 bytes, then
+        the default flow stop threshold would be 90% of 10000 = 9000 bytes and
+        the flow resume threshold would be 75% of 10000 = 7500.  The same
+        computation is performed should a queue be created with a maximum size
+        expressed as a message count instead of a byte count.
+      </para>
+
+      <para>
+        If not overridden by the user, the value of the
+        default-flow-stop-threshold is 80% and the value of the
+        default-flow-resume-threshold is 70%.
+      </para>
+
+      <para>
+        The user may disable default queue flow control broker-wide by
+        specifying the value 0 for both of these configuration options.  Note
+        that flow control may still be applied manually on a per-queue basis in
+        this case.
+      </para>
+
+      <para>
+        The user may manually set the flow thresholds when creating a queue.
+        The following options may be provided when adding a queue using the
+        <command>qpid-config</command> command line tool:
+      </para>
+
+      <programlisting>
+        --flow-stop-size=<replaceable>N</replaceable>  Sets the queue's flow stop threshold to <replaceable>N</replaceable> total bytes.
+        --flow-resume-size=<replaceable>N</replaceable>  Sets the queue's flow resume threshold to <replaceable>N</replaceable> total bytes.
+        --flow-stop-count=<replaceable>N</replaceable> Sets the queue's flow stop threshold to <replaceable>N</replaceable> total messages.
+        --flow-resume-count=<replaceable>N</replaceable> Sets the queue's flow resume threshold to <replaceable>N</replaceable> total messages.
+      </programlisting>
+
+      <para>
+        Flow thresholds may also be specified in the
+        <command>queue.declare</command> method, via the
+        <command>arguments</command> parameter map.  The following keys can be
+        provided in the arguments map for setting flow thresholds:
+      </para>
+
+      <table>
+        <title>Queue Declare Method Flow Control Arguments</title>
+        <tgroup cols="2">
+          <thead>
+            <row>
+              <entry>Key</entry>
+              <entry>Value</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry>qpid.flow_stop_size</entry>
+              <entry>integer - queue's flow stop threshold value in bytes</entry>
+            </row>
+            <row>
+              <entry>qpid.flow_resume_size</entry>
+              <entry>integer - queue's flow resume threshold value in bytes</entry>
+            </row>
+            <row>
+              <entry>qpid.flow_stop_count</entry>
+              <entry>integer - queue's flow stop threshold value as a message count</entry>
+            </row>
+            <row>
+              <entry>qpid.flow_resume_count</entry>
+              <entry>integer - queue's flow resume threshold value as a message count</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table>
+
+      <para>
+        The user may disable flow control on a per queue basis by setting
+        the flow-stop-size and flow-stop-count to zero for the queue.
+      </para>
+
+      <para>
+        The current state of flow control for a given queue can be
+        determined by the "flowStopped" statistic.  This statistic is
+        available in the queue's QMF management object. The value of
+        flowStopped is True when the queue's capacity has exceeded the
+        flow stop threshold.  The value of flowStopped is False when the
+        queue is no longer blocking due to flow control.
+      </para>
+
+      <para>
+        A queue will also track the number of times flow control has been
+        activated.  The "flowStoppedCount" statistic is incremented each time
+        the queue's capacity exceeds a flow stop threshold.  This statistic can
+        be used to monitor the activity of flow control for any given queue
+        over time.
+      </para>
+
+      <table>
+        <title>Flow Control Statistics available in Queue's QMF Class</title>
+        <tgroup cols="3">
+          <thead>
+            <row>
+              <entry>Statistic Name</entry>
+              <entry>Type</entry>
+              <entry>Description</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry>flowStopped</entry>
+              <entry>Boolean</entry>
+              <entry>If true, producers are blocked by flow control.</entry>
+            </row>
+            <row>
+              <entry>flowStoppedCount</entry>
+              <entry>count32</entry>
+              <entry>Number of times flow control was activated for this queue</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table>
+    </section>
+    <!--h2-->
+  </section>

Propchange: qpid/branches/qpid-2920/qpid/doc/book/src/producer-flow-control.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: qpid/branches/qpid-2920/qpid/doc/book/src/producer-flow-control.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: qpid/branches/qpid-2920/qpid/doc/book/src/producer-flow-control.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Copied: qpid/branches/qpid-2920/qpid/dotnet/Consumer/Program.cs (from r1073448, qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/10_all)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/Consumer/Program.cs?p2=qpid/branches/qpid-2920/qpid/dotnet/Consumer/Program.cs&p1=qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/10_all&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/10_all (original)
+++ qpid/branches/qpid-2920/qpid/dotnet/Consumer/Program.cs Tue Mar 15 01:54:07 2011
@@ -9,7 +9,7 @@
  * 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
@@ -17,14 +17,14 @@
  * specific language governing permissions and limitations
  * under the License.
  *
- */ 
-
-#! /bin/bash
-
-echo "Asking all servers to say their names... "
-qrsh 127.0.0.1 5813 \
-     all sayName
-
-
-
-
+ */
+namespace Consumer
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            Apache.Qpid.Client.Tests.interop.Consumer.Main(args);
+        }
+    }
+}

Added: qpid/branches/qpid-2920/qpid/dotnet/Consumer/default.build
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/Consumer/default.build?rev=1081634&view=auto
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/Consumer/default.build (added)
+++ qpid/branches/qpid-2920/qpid/dotnet/Consumer/default.build Tue Mar 15 01:54:07 2011
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+ 
+ 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.
+ 
+-->
+
+<project name="Consumer" default="build">
+    <!--
+		Properties that come from master build file
+		- build.dir: root directory for build
+		- build.debug: true if building debug release
+		- build.defines: variables to define during build
+    -->
+
+    <target name="build">
+        <csc target="exe" 
+				define="${build.defines}" 
+            debug="${build.debug}"
+            unsafe="true"
+				output="${build.dir}/${project::get-name()}.exe">
+			
+			<sources>
+			   <include name="**/*.cs" />
+         </sources>
+         <references>
+            <include name="${build.dir}\Apache.Qpid.Client.Tests.dll"/>
+         </references>
+        </csc>
+    </target>
+</project>
+

Copied: qpid/branches/qpid-2920/qpid/dotnet/Producer/Program.cs (from r1073448, qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/1_remote_run)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/Producer/Program.cs?p2=qpid/branches/qpid-2920/qpid/dotnet/Producer/Program.cs&p1=qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/1_remote_run&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/1_remote_run (original)
+++ qpid/branches/qpid-2920/qpid/dotnet/Producer/Program.cs Tue Mar 15 01:54:07 2011
@@ -9,7 +9,7 @@
  * 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
@@ -17,10 +17,14 @@
  * specific language governing permissions and limitations
  * under the License.
  *
- */ 
-
-#! /bin/bash
-
-
-./qrsh 127.0.0.1 5813 \
-       mrg23 command_1 /home/mick/redhat/qrsh/qrsh_run/my_command foo bar baz
+ */
+namespace Producer
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            Apache.Qpid.Client.Tests.interop.Producer.Main(args);
+        }
+    }
+}

Added: qpid/branches/qpid-2920/qpid/dotnet/Producer/default.build
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/Producer/default.build?rev=1081634&view=auto
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/Producer/default.build (added)
+++ qpid/branches/qpid-2920/qpid/dotnet/Producer/default.build Tue Mar 15 01:54:07 2011
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+ 
+ 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.
+ 
+-->
+
+<project name="Producer" default="build">
+    <!--
+		Properties that come from master build file
+		- build.dir: root directory for build
+		- build.debug: true if building debug release
+		- build.defines: variables to define during build
+    -->
+
+    <target name="build">
+        <csc target="exe" 
+				define="${build.defines}" 
+            debug="${build.debug}"
+            unsafe="true"
+				output="${build.dir}/${project::get-name()}.exe">
+			
+			<sources>
+			   <include name="**/*.cs" />
+         </sources>
+         <references>
+            <include name="${build.dir}\Apache.Qpid.Client.Tests.dll"/>
+         </references>
+        </csc>
+    </target>
+</project>
+

Copied: qpid/branches/qpid-2920/qpid/dotnet/Program.cs (from r1073448, qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/2_forever)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/Program.cs?p2=qpid/branches/qpid-2920/qpid/dotnet/Program.cs&p1=qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/2_forever&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/tests/qrsh_utils/2_forever (original)
+++ qpid/branches/qpid-2920/qpid/dotnet/Program.cs Tue Mar 15 01:54:07 2011
@@ -9,7 +9,7 @@
  * 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
@@ -17,10 +17,14 @@
  * specific language governing permissions and limitations
  * under the License.
  *
- */ 
-
-#! /bin/bash
-
-
-./qrsh 127.0.0.1 5813 \
-       mrg23 command_2 /home/mick/redhat/qrsh/qrsh_run/forever foo bar baz
+ */
+namespace Consumer
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            Apache.Qpid.Client.Tests.interop.Consumer.Main(args);
+        }
+    }
+}

Added: qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/Consumer.cs
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/Consumer.cs?rev=1081634&view=auto
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/Consumer.cs (added)
+++ qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/Consumer.cs Tue Mar 15 01:54:07 2011
@@ -0,0 +1,56 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+using System;
+using Apache.Qpid.Client;
+using Apache.Qpid.Messaging;
+
+namespace Apache.Qpid.Client.Tests.interop
+{
+    public class Consumer
+    {
+        public static void Main(string[] args)
+        {
+            try
+            {
+                const string connectionUrl = @"amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'";
+		const string queueName = @"test-queue";
+
+                var connectionInfo = QpidConnectionInfo.FromUrl(connectionUrl);
+                var connection = new AMQConnection(connectionInfo);
+                var channel = connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge, 1);
+
+		channel.DeclareQueue(queueName, false, true, true);
+	        channel.Bind(queueName, ExchangeNameDefaults.DIRECT, queueName);
+                IMessageConsumer consumer = channel.CreateConsumerBuilder(queueName) .Create();
+                connection.Start();
+
+                ITextMessage message = (ITextMessage) consumer.Receive();
+		Console.WriteLine("Got: " + message.Text);
+                connection.Dispose();
+            }
+            catch (Exception e)
+            {
+                Console.WriteLine(e);
+            }
+        }
+    }
+}

Added: qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/Producer.cs
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/Producer.cs?rev=1081634&view=auto
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/Producer.cs (added)
+++ qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/Producer.cs Tue Mar 15 01:54:07 2011
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+using System;
+using Apache.Qpid.Client;
+using Apache.Qpid.Messaging;
+
+namespace Apache.Qpid.Client.Tests.interop
+{
+    public class Producer
+    {
+        public static void Main(string[] args)
+        {
+            try
+            {
+                const string connectionUrl = @"amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'";
+                const string queueName = @"test-queue";
+
+                var connectionInfo = QpidConnectionInfo.FromUrl(connectionUrl);
+                var connection = new AMQConnection(connectionInfo);
+                var channel = connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
+                var publisher = channel.CreatePublisherBuilder()
+                    .WithExchangeName(ExchangeNameDefaults.DIRECT)
+                    .WithRoutingKey(queueName)
+                    .Create();
+                IMessage message = channel.CreateTextMessage("0123456789");
+                publisher.Send(message);
+                Console.WriteLine("Sent message");
+                connection.Dispose();
+            }            
+            catch (Exception e)
+            {
+                Console.WriteLine(e);
+            }
+        }
+    }
+}

Modified: qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/TopicListener.cs
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/TopicListener.cs?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/TopicListener.cs (original)
+++ qpid/branches/qpid-2920/qpid/dotnet/Qpid.Client.Tests/interop/TopicListener.cs Tue Mar 15 01:54:07 2011
@@ -19,6 +19,7 @@
  *
  */
 using System;
+using System.Threading;
 using log4net;
 using Apache.Qpid.Messaging;
 using Apache.Qpid.Client.Qms;
@@ -47,6 +48,12 @@ namespace Apache.Qpid.Client.Tests.inter
         /// <summary> Holds the producer to send report messages on. </summary>
         private IMessagePublisher publisher;
 
+        /// <summary> A monitor used to wait for shutdown. </summary>
+        private AutoResetEvent shutdownReceivedEvt = new AutoResetEvent(false);
+
+        /// <summary> Holds the default test timeout for communications . </summary>
+        const int TIMEOUT = 60000;
+
         /// <summary> Holds a flag to indicate that a timer has begun on the first message. Reset when report is sent. </summary> */
         private bool init;
     
@@ -85,6 +92,15 @@ namespace Apache.Qpid.Client.Tests.inter
 
             connection.Start();
             Console.WriteLine("Waiting for messages...");
+
+            if (shutdownReceivedEvt.WaitOne(TIMEOUT, true))
+            {
+                Console.WriteLine("Shutting down - shut down message was received");
+            }
+            else 
+            {
+                Console.WriteLine("Shutting down - timeout elapsed");
+            }
         }
 
         public static void Main(String[] argv)
@@ -185,6 +201,8 @@ namespace Apache.Qpid.Client.Tests.inter
             connection.Stop();
             channel.Dispose();
             connection.Dispose();
+
+            shutdownReceivedEvt.Set();
         }
 
         /// <summary> Sends the report message to the response location. </summary>

Modified: qpid/branches/qpid-2920/qpid/dotnet/README.txt
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/README.txt?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/README.txt (original)
+++ qpid/branches/qpid-2920/qpid/dotnet/README.txt Tue Mar 15 01:54:07 2011
@@ -32,6 +32,7 @@ If using nant, set up PATH to include Na
 
 If using msbuild, it is recommended to use a "Visual Studio Command Prompt"
 
+
 Building
 ========
 
@@ -49,6 +50,27 @@ If you are using nant, the script build-
  
 To build for Mono on Linux (to bin/mono-2.0) the build-mono shell script is provided.
 
+Running the Examples
+====================
+
+The tree contains two paired examples that demonstrate some of the features of the library:
+Producer/Consumer and TopicPublisher/TopicListener.
+
+To run on Mono on Linux (cd to bin/mono-2.0) and execute
+
+mono Consumer.exe   (in one window , and 
+mono Producer.exe    in another window)
+
+or:
+
+mono TopicListener.exe    (in one window , and 
+mono TopicPublisher.exe    in another window)
+
+Both examples assume you have a broker running on localhost:5672.  You must run Consumer/TopicListener
+before Producer/TopicPublisher in order that queue is created before the first message is sent.
+
+The source code for the examples is in directory  Qpid.Client.Tests/interop.
+
 Releasing
 =========
 

Modified: qpid/branches/qpid-2920/qpid/dotnet/build-mono
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/build-mono?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/build-mono (original)
+++ qpid/branches/qpid-2920/qpid/dotnet/build-mono Tue Mar 15 01:54:07 2011
@@ -18,4 +18,4 @@
 # under the License.
 #
 
-nant -t:mono-2.0
+nant -t:mono-2.0 "$@"

Modified: qpid/branches/qpid-2920/qpid/dotnet/build-nant-release
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/build-nant-release?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/build-nant-release (original)
+++ qpid/branches/qpid-2920/qpid/dotnet/build-nant-release Tue Mar 15 01:54:07 2011
@@ -1,24 +1,3 @@
-#
-# 
-# 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.
-# 
-#
-
 #!/bin/bash
 #
 # 

Modified: qpid/branches/qpid-2920/qpid/dotnet/default.build
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/dotnet/default.build?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/dotnet/default.build (original)
+++ qpid/branches/qpid-2920/qpid/dotnet/default.build Tue Mar 15 01:54:07 2011
@@ -62,9 +62,12 @@
 
     <!-- Other test or utility assemblies. -->
     <fileset id='other.builds'>
+        <include name="TestClient/default.build" />	
+        <!-- Examples -->
         <include name="TopicListener/default.build" />	
         <include name="TopicPublisher/default.build" />	
-        <include name="TestClient/default.build" />	
+        <include name="Consumer/default.build" />	
+        <include name="Producer/default.build" />	
     </fileset>
 
     <!-- Prepare environment for a debug build. -->

Modified: qpid/branches/qpid-2920/qpid/extras/qmf/setup.py
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/setup.py?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/extras/qmf/setup.py (original)
+++ qpid/branches/qpid-2920/qpid/extras/qmf/setup.py Tue Mar 15 01:54:07 2011
@@ -20,10 +20,10 @@
 from distutils.core import setup
 
 setup(name="qpid-qmf",
-      version="0.9",
+      version="0.11",
       author="Apache Qpid",
       author_email="dev@qpid.apache.org",
-      packages=["qmf", "qmf2", "qmf2.tests"],
+      packages=["qmf"],
       package_dir={"": "src/py"},
       url="http://qpid.apache.org/",
       license="Apache Software License",

Modified: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf/console.py
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf/console.py?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf/console.py (original)
+++ qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf/console.py Tue Mar 15 01:54:07 2011
@@ -1211,11 +1211,22 @@ class Session:
     try:
       agentName = ah["qmf.agent"]
       values = content["_values"]
-      timestamp = values["_timestamp"]
-      interval = values["_heartbeat_interval"]
+
+      if '_timestamp' in values:
+        timestamp = values["_timestamp"]
+      else:
+        timestamp = values['timestamp']
+
+      if '_heartbeat_interval' in values:
+        interval = values['_heartbeat_interval']
+      else:
+        interval = values['heartbeat_interval']
+
       epoch = 0
       if '_epoch' in values:
         epoch = values['_epoch']
+      elif 'epoch' in values:
+        epoch = values['epoch']
     except Exception,e:
       return
 
@@ -2416,7 +2427,7 @@ class Broker(Thread):
       if uid.__class__ == tuple and len(uid) == 2:
         self.saslUser = uid[1]
       else:
-        self.saslUser = None
+        self.saslUser = self.authUser
 
       # prevent topic queues from filling up (and causing the agents to
       # disconnect) by discarding the oldest queued messages when full.

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/__init__.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/__init__.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/__init__.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/__init__.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/__init__.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/__init__.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/agent.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/agent.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/agent.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/agent.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/agent.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/agent.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/common.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/common.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/common.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/common.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/common.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/common.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/console.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/console.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/console.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/console.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/console.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/console.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/__init__.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/__init__.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/__init__.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/__init__.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/__init__.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/__init__.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/agent_discovery.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/agent_discovery.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/agent_discovery.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/agent_discovery.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/agent_discovery.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/agent_discovery.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/agent_test.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/agent_test.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/agent_test.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/agent_test.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/agent_test.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/agent_test.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/async_method.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/async_method.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/async_method.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/async_method.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/async_method.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/async_method.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/async_query.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/async_query.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/async_query.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/async_query.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/async_query.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/async_query.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/basic_method.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/basic_method.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/basic_method.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/basic_method.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/basic_method.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/basic_method.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/basic_query.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/basic_query.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/basic_query.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/basic_query.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/basic_query.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/basic_query.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/console_test.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/console_test.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/console_test.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/console_test.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/console_test.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/console_test.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/events.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/events.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/events.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/events.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/events.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/events.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/multi_response.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/multi_response.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/multi_response.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/multi_response.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/multi_response.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/multi_response.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/obj_gets.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/obj_gets.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/obj_gets.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/obj_gets.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/obj_gets.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/obj_gets.py
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/subscriptions.py (from r1073448, qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/subscriptions.py)
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/subscriptions.py?p2=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/subscriptions.py&p1=qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2/tests/subscriptions.py&r1=1073448&r2=1081634&rev=1081634&view=diff
==============================================================================
    (empty)

Propchange: qpid/branches/qpid-2920/qpid/extras/qmf/src/py/qmf2-prototype/tests/subscriptions.py
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/qpid-2920/qpid/java/broker-plugins/experimental/shutdown/src/main/java/shutdown.bnd
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker-plugins/experimental/shutdown/src/main/java/shutdown.bnd?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker-plugins/experimental/shutdown/src/main/java/shutdown.bnd (original)
+++ qpid/branches/qpid-2920/qpid/java/broker-plugins/experimental/shutdown/src/main/java/shutdown.bnd Tue Mar 15 01:54:07 2011
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-ver: 0.9.0
+ver: 0.11.0
 
 Bundle-SymbolicName: qpid-shutdown-plugin
 Bundle-Version: ${ver}

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java Tue Mar 15 01:54:07 2011
@@ -1096,6 +1096,11 @@ public class QMFService implements Confi
             return Boolean.FALSE;
         }
 
+        public Long getFlowStoppedCount()
+        {
+            return 0L;
+        }
+
         public BrokerSchema.QueueClass.PurgeMethodResponseCommand purge(final BrokerSchema.QueueClass.PurgeMethodResponseCommandFactory factory,
                                                                         final Long request)
         {

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java Tue Mar 15 01:54:07 2011
@@ -327,4 +327,74 @@ public class AMQBrokerManagerMBean exten
     {
         return getObjectNameForSingleInstanceMBean();
     }
+
+    public void resetStatistics() throws Exception
+    {
+        getVirtualHost().resetStatistics();
+    }
+
+    public double getPeakMessageDeliveryRate()
+    {
+        return getVirtualHost().getMessageDeliveryStatistics().getPeak();
+    }
+
+    public double getPeakDataDeliveryRate()
+    {
+        return getVirtualHost().getDataDeliveryStatistics().getPeak();
+    }
+
+    public double getMessageDeliveryRate()
+    {
+        return getVirtualHost().getMessageDeliveryStatistics().getRate();
+    }
+
+    public double getDataDeliveryRate()
+    {
+        return getVirtualHost().getDataDeliveryStatistics().getRate();
+    }
+
+    public long getTotalMessagesDelivered()
+    {
+        return getVirtualHost().getMessageDeliveryStatistics().getTotal();
+    }
+
+    public long getTotalDataDelivered()
+    {
+        return getVirtualHost().getDataDeliveryStatistics().getTotal();
+    }
+
+    public double getPeakMessageReceiptRate()
+    {
+        return getVirtualHost().getMessageReceiptStatistics().getPeak();
+    }
+
+    public double getPeakDataReceiptRate()
+    {
+        return getVirtualHost().getDataReceiptStatistics().getPeak();
+    }
+
+    public double getMessageReceiptRate()
+    {
+        return getVirtualHost().getMessageReceiptStatistics().getRate();
+    }
+
+    public double getDataReceiptRate()
+    {
+        return getVirtualHost().getDataReceiptStatistics().getRate();
+    }
+
+    public long getTotalMessagesReceived()
+    {
+        return getVirtualHost().getMessageReceiptStatistics().getTotal();
+    }
+
+    public long getTotalDataReceived()
+    {
+        return getVirtualHost().getDataReceiptStatistics().getTotal();
+    }
+
+    public boolean isStatisticsEnabled()
+    {
+        return getVirtualHost().isStatisticsEnabled();
+    }
 }

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java Tue Mar 15 01:54:07 2011
@@ -22,6 +22,7 @@ package org.apache.qpid.server;
 
 import org.apache.log4j.Logger;
 
+import org.apache.qpid.AMQConnectionException;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.AMQSecurityException;
 import org.apache.qpid.framing.AMQMethodBody;
@@ -141,6 +142,7 @@ public class AMQChannel implements Sessi
     private final AtomicLong _txnCommits = new AtomicLong(0);
     private final AtomicLong _txnRejects = new AtomicLong(0);
     private final AtomicLong _txnCount = new AtomicLong(0);
+    private final AtomicLong _txnUpdateTime = new AtomicLong(0);
 
     private final AMQProtocolSession _session;
     private AtomicBoolean _closing = new AtomicBoolean(false);
@@ -200,6 +202,11 @@ public class AMQChannel implements Sessi
         return !(_transaction instanceof AutoCommitTransaction);
     }
     
+    public boolean inTransaction()
+    {
+        return isTransactional() && _txnUpdateTime.get() > 0 && _transaction.getTransactionStartTime() > 0;
+    }
+    
     private void incrementOutstandingTxnsIfNecessary()
     {
         if(isTransactional())
@@ -295,7 +302,6 @@ public class AMQChannel implements Sessi
             });
 
             deliverCurrentMessageIfComplete();
-
         }
     }
 
@@ -333,11 +339,15 @@ public class AMQChannel implements Sessi
                     {
                         _transaction.enqueue(destinationQueues, _currentMessage, new MessageDeliveryAction(_currentMessage, destinationQueues, isTransactional()));
                         incrementOutstandingTxnsIfNecessary();
+			            updateTransactionalActivity();
                     }
                 }
             }
             finally
             {
+                long bodySize = _currentMessage.getSize();
+                long timestamp = ((BasicContentHeaderProperties) _currentMessage.getContentHeader().properties).getTimestamp();
+                _session.registerMessageReceived(bodySize, timestamp);
                 _currentMessage = null;
             }
         }
@@ -794,6 +804,7 @@ public class AMQChannel implements Sessi
     {
         Collection<QueueEntry> ackedMessages = getAckedMessages(deliveryTag, multiple);
         _transaction.dequeue(ackedMessages, new MessageAcknowledgeAction(ackedMessages));
+	    updateTransactionalActivity();
     }
 
     private Collection<QueueEntry> getAckedMessages(long deliveryTag, boolean multiple)
@@ -968,6 +979,17 @@ public class AMQChannel implements Sessi
 
     }
 
+    /**
+     * Update last transaction activity timestamp
+     */
+    private void updateTransactionalActivity()
+    {
+        if (isTransactional())
+        {
+            _txnUpdateTime.set(System.currentTimeMillis());
+        }
+    }
+
     public String toString()
     {
         return "["+_session.toString()+":"+_channelId+"]";
@@ -1018,6 +1040,7 @@ public class AMQChannel implements Sessi
             {
                 getProtocolSession().getProtocolOutputConverter().writeDeliver(entry, getChannelId(),
                                                                                deliveryTag, sub.getConsumerTag());
+               _session.registerMessageDelivered(entry.getMessage().getSize());
             }
 
         };
@@ -1407,4 +1430,36 @@ public class AMQChannel implements Sessi
     {
         _session.mgmtCloseChannel(_channelId);
     }
+    
+    public void checkTransactionStatus(long openWarn, long openClose, long idleWarn, long idleClose) throws AMQException
+    {
+        if (inTransaction())
+        {
+            long currentTime = System.currentTimeMillis();
+            long openTime = currentTime - _transaction.getTransactionStartTime();
+            long idleTime = currentTime - _txnUpdateTime.get();
+
+            // Log a warning on idle or open transactions
+            if (idleWarn > 0L && idleTime > idleWarn)
+            {
+                CurrentActor.get().message(_logSubject, ChannelMessages.IDLE_TXN(idleTime));
+                _logger.warn("IDLE TRANSACTION ALERT " + _logSubject.toString() + " " + idleTime + " ms");
+            }
+            else if (openWarn > 0L && openTime > openWarn)
+            {
+                CurrentActor.get().message(_logSubject, ChannelMessages.OPEN_TXN(openTime));
+                _logger.warn("OPEN TRANSACTION ALERT " + _logSubject.toString() + " " + openTime + " ms");
+            }
+
+            // Close connection for idle or open transactions that have timed out
+            if (idleClose > 0L && idleTime > idleClose)
+            {
+                getConnectionModel().closeSession(this, AMQConstant.RESOURCE_ERROR, "Idle transaction timed out");
+            }
+            else if (openClose > 0L && openTime > openClose)
+            {
+                getConnectionModel().closeSession(this, AMQConstant.RESOURCE_ERROR, "Open transaction timed out");
+            }
+        }
+    }
 }

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java Tue Mar 15 01:54:07 2011
@@ -320,8 +320,7 @@ public class Main
             ConfigurationManagementMBean configMBean = new ConfigurationManagementMBean();
             configMBean.register();
 
-            ServerInformationMBean sysInfoMBean =
-                    new ServerInformationMBean(QpidProperties.getBuildVersion(), QpidProperties.getReleaseVersion());
+            ServerInformationMBean sysInfoMBean = new ServerInformationMBean(config);
             sysInfoMBean.register();
 
 

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java Tue Mar 15 01:54:07 2011
@@ -767,6 +767,36 @@ public class ServerConfiguration extends
                                                        DEFAULT_HOUSEKEEPING_PERIOD));
     }
 
+    public long getStatisticsSamplePeriod()
+    {
+        return getConfig().getLong("statistics.sample.period", 5000L);
+    }
+
+    public boolean isStatisticsGenerationBrokerEnabled()
+    {
+        return getConfig().getBoolean("statistics.generation.broker", false);
+    }
+
+    public boolean isStatisticsGenerationVirtualhostsEnabled()
+    {
+        return getConfig().getBoolean("statistics.generation.virtualhosts", false);
+    }
+
+    public boolean isStatisticsGenerationConnectionsEnabled()
+    {
+        return getConfig().getBoolean("statistics.generation.connections", false);
+    }
+
+    public long getStatisticsReportingPeriod()
+    {
+        return getConfig().getLong("statistics.reporting.period", 0L);
+    }
+
+    public boolean isStatisticsReportResetEnabled()
+    {
+        return getConfig().getBoolean("statistics.reporting.reset", false);
+    }
+
     public NetworkDriverConfiguration getNetworkConfiguration()
     {
         return new NetworkDriverConfiguration()

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java Tue Mar 15 01:54:07 2011
@@ -313,4 +313,24 @@ public class VirtualHostConfiguration ex
     {
         return getIntValue("housekeeping.poolSize", Runtime.getRuntime().availableProcessors());
     }
+
+    public long getTransactionTimeoutOpenWarn()
+    {
+        return getLongValue("transactionTimeout.openWarn", 0L);
+    }
+
+    public long getTransactionTimeoutOpenClose()
+    {
+        return getLongValue("transactionTimeout.openClose", 0L);
+    }
+
+    public long getTransactionTimeoutIdleWarn()
+    {
+        return getLongValue("transactionTimeout.idleWarn", 0L);
+    }
+
+    public long getTransactionTimeoutIdleClose()
+    {
+        return getLongValue("transactionTimeout.idleClose", 0L);
+    }
 }

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java Tue Mar 15 01:54:07 2011
@@ -20,19 +20,19 @@
  */
 package org.apache.qpid.server.connection;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.log4j.Logger;
-import org.apache.qpid.AMQConnectionException;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.common.Closeable;
 import org.apache.qpid.protocol.AMQConstant;
-import org.apache.qpid.server.protocol.AMQProtocolSession;
+import org.apache.qpid.server.protocol.AMQConnectionModel;
 
 public class ConnectionRegistry implements IConnectionRegistry, Closeable
 {
-    private List<AMQProtocolSession> _registry = new CopyOnWriteArrayList<AMQProtocolSession>();
+    private List<AMQConnectionModel> _registry = new CopyOnWriteArrayList<AMQConnectionModel>();
 
     private Logger _logger = Logger.getLogger(ConnectionRegistry.class);
 
@@ -40,44 +40,42 @@ public class ConnectionRegistry implemen
     {
         // None required
     }
-    
-    public void expireClosedChannels()
-    {
-        for (AMQProtocolSession connection : _registry)
-        {
-            connection.closeIfLingeringClosedChannels();
-        }
-    }
 
     /** Close all of the currently open connections. */
     public void close()
     {
         while (!_registry.isEmpty())
         {
-            AMQProtocolSession connection = _registry.get(0);
-
-            try
-            {
-                connection.closeConnection(0, new AMQConnectionException(AMQConstant.INTERNAL_ERROR, "Broker is shutting down",
-                                                                         0, 0,
-                                                                         connection.getProtocolOutputConverter().getProtocolMajorVersion(),
-                                                                         connection.getProtocolOutputConverter().getProtocolMinorVersion(),
-                                                                         (Throwable) null), true);
-            }
-            catch (AMQException e)
-            {
-                _logger.warn("Error closing connection:" + e.getMessage());
-            }
+            AMQConnectionModel connection = _registry.get(0);
+            closeConnection(connection, AMQConstant.INTERNAL_ERROR, "Broker is shutting down");
+        }
+    }
+    
+    public void closeConnection(AMQConnectionModel connection, AMQConstant cause, String message)
+    {
+        try
+        {
+            connection.close(cause, message);
+        }
+        catch (AMQException e)
+        {
+            _logger.warn("Error closing connection:" + e.getMessage());
         }
     }
 
-    public void registerConnection(AMQProtocolSession connnection)
+    public void registerConnection(AMQConnectionModel connnection)
     {
         _registry.add(connnection);
     }
 
-    public void deregisterConnection(AMQProtocolSession connnection)
+    public void deregisterConnection(AMQConnectionModel connnection)
     {
         _registry.remove(connnection);
     }
+
+    @Override
+    public List<AMQConnectionModel> getConnections()
+    {
+        return new ArrayList<AMQConnectionModel>(_registry);
+    }
 }

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java Tue Mar 15 01:54:07 2011
@@ -20,18 +20,23 @@
  */
 package org.apache.qpid.server.connection;
 
-import org.apache.qpid.server.protocol.AMQProtocolSession;
+import java.util.List;
+
 import org.apache.qpid.AMQException;
+import org.apache.qpid.protocol.AMQConstant;
+import org.apache.qpid.server.protocol.AMQConnectionModel;
 
 public interface IConnectionRegistry
 {
-
     public void initialise();
 
     public void close() throws AMQException;
+    
+    public void closeConnection(AMQConnectionModel connection, AMQConstant cause, String message);
+    
+    public List<AMQConnectionModel> getConnections();
 
-    public void registerConnection(AMQProtocolSession connnection);
-
-    public void deregisterConnection(AMQProtocolSession connnection);
+    public void registerConnection(AMQConnectionModel connnection);
 
+    public void deregisterConnection(AMQConnectionModel connnection);
 }

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchangeMBean.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchangeMBean.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchangeMBean.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchangeMBean.java Tue Mar 15 01:54:07 2011
@@ -90,12 +90,12 @@ public abstract class AbstractExchangeMB
 
     public String getObjectInstanceName()
     {
-        return _exchange.getNameShortString().toString();
+        return ObjectName.quote(_exchange.getName());
     }
 
     public String getName()
     {
-        return _exchange.getNameShortString().toString();
+        return _exchange.getName();
     }
 
     public String getExchangeType()

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/information/management/ServerInformationMBean.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/information/management/ServerInformationMBean.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/information/management/ServerInformationMBean.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/information/management/ServerInformationMBean.java Tue Mar 15 01:54:07 2011
@@ -22,9 +22,11 @@ package org.apache.qpid.server.informati
 
 import java.io.IOException;
 
+import org.apache.qpid.common.QpidProperties;
 import org.apache.qpid.management.common.mbeans.ServerInformation;
 import org.apache.qpid.management.common.mbeans.annotations.MBeanDescription;
 import org.apache.qpid.server.management.AMQManagedObject;
+import org.apache.qpid.server.registry.ApplicationRegistry;
 
 import javax.management.JMException;
 
@@ -34,12 +36,15 @@ public class ServerInformationMBean exte
 {
     private String buildVersion;
     private String productVersion;
+    private ApplicationRegistry registry;
     
-    public ServerInformationMBean(String buildVersion, String productVersion) throws JMException
+    public ServerInformationMBean(ApplicationRegistry applicationRegistry) throws JMException
     {
         super(ServerInformation.class, ServerInformation.TYPE);
-        this.buildVersion = buildVersion;
-        this.productVersion = productVersion;
+
+        registry = applicationRegistry;
+        buildVersion = QpidProperties.getBuildVersion();
+        productVersion = QpidProperties.getReleaseVersion();
     }
 
     public String getObjectInstanceName()
@@ -67,5 +72,75 @@ public class ServerInformationMBean exte
         return productVersion;
     }
 
+
+    public void resetStatistics() throws Exception
+    {
+        registry.resetStatistics();
+    }
+
+    public double getPeakMessageDeliveryRate()
+    {
+        return registry.getMessageDeliveryStatistics().getPeak();
+    }
+
+    public double getPeakDataDeliveryRate()
+    {
+        return registry.getDataDeliveryStatistics().getPeak();
+    }
+
+    public double getMessageDeliveryRate()
+    {
+        return registry.getMessageDeliveryStatistics().getRate();
+    }
+
+    public double getDataDeliveryRate()
+    {
+        return registry.getDataDeliveryStatistics().getRate();
+    }
+
+    public long getTotalMessagesDelivered()
+    {
+        return registry.getMessageDeliveryStatistics().getTotal();
+    }
+
+    public long getTotalDataDelivered()
+    {
+        return registry.getDataDeliveryStatistics().getTotal();
+    }
+
+    public double getPeakMessageReceiptRate()
+    {
+        return registry.getMessageReceiptStatistics().getPeak();
+    }
+
+    public double getPeakDataReceiptRate()
+    {
+        return registry.getDataReceiptStatistics().getPeak();
+    }
+
+    public double getMessageReceiptRate()
+    {
+        return registry.getMessageReceiptStatistics().getRate();
+    }
+
+    public double getDataReceiptRate()
+    {
+        return registry.getDataReceiptStatistics().getRate();
+    }
+
+    public long getTotalMessagesReceived()
+    {
+        return registry.getMessageReceiptStatistics().getTotal();
+    }
+
+    public long getTotalDataReceived()
+    {
+        return registry.getDataReceiptStatistics().getTotal();
+    }
+
+    public boolean isStatisticsEnabled()
+    {
+        return registry.isStatisticsEnabled();
+    }
     
 }

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties Tue Mar 15 01:54:07 2011
@@ -32,4 +32,7 @@ STOPPED = BRK-1005 : Stopped
 # 0 - path
 CONFIG = BRK-1006 : Using configuration : {0}
 # 0 - path
-LOG_CONFIG = BRK-1007 : Using logging configuration : {0}
\ No newline at end of file
+LOG_CONFIG = BRK-1007 : Using logging configuration : {0}
+
+STATS_DATA = BRK-1008 : {0,choice,0#delivered|1#received} : {1,number,#.###} kB/s peak : {2,number,#} bytes total
+STATS_MSGS = BRK-1009 : {0,choice,0#delivered|1#received} : {1,number,#.###} msg/s peak : {2,number,#} msgs total
\ No newline at end of file

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Channel_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Channel_logmessages.properties?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Channel_logmessages.properties (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Channel_logmessages.properties Tue Mar 15 01:54:07 2011
@@ -28,3 +28,7 @@ PREFETCH_SIZE = CHN-1004 : Prefetch Size
 # 0 - queue causing flow control
 FLOW_ENFORCED = CHN-1005 : Flow Control Enforced (Queue {0})
 FLOW_REMOVED = CHN-1006 : Flow Control Removed
+# Channel Transactions
+# 0 - time in milliseconds
+OPEN_TXN = CHN-1007 : Open Transaction : {0,number} ms
+IDLE_TXN = CHN-1008 : Idle Transaction : {0,number} ms

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties Tue Mar 15 01:54:07 2011
@@ -20,4 +20,7 @@
 #
 # 0 - name
 CREATED = VHT-1001 : Created : {0}
-CLOSED = VHT-1002 : Closed
\ No newline at end of file
+CLOSED = VHT-1002 : Closed
+
+STATS_DATA = VHT-1003 : {0} : {1,choice,0#delivered|1#received} : {2,number,#.###} kB/s peak : {3,number,#} bytes total
+STATS_MSGS = VHT-1004 : {0} : {1,choice,0#delivered|1#received} : {2,number,#.###} msg/s peak : {3,number,#} msgs total`
\ No newline at end of file

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java Tue Mar 15 01:54:07 2011
@@ -153,32 +153,4 @@ public abstract class DefaultManagedObje
             return "";
     }
 
-    protected static StringBuffer jmxEncode(StringBuffer jmxName, int attrPos)
-    {
-        for (int i = attrPos; i < jmxName.length(); i++)
-        {
-            if (jmxName.charAt(i) == ',')
-            {
-                jmxName.setCharAt(i, ';');
-            }
-            else if (jmxName.charAt(i) == ':')
-            {
-                jmxName.setCharAt(i, '-');
-            }
-            else if (jmxName.charAt(i) == '?' ||
-                    jmxName.charAt(i) == '*' ||
-                    jmxName.charAt(i) == '\\')
-            {
-                jmxName.insert(i, '\\');
-                i++;
-            }
-            else if (jmxName.charAt(i) == '\n')
-            {
-                jmxName.insert(i, '\\');
-                i++;
-                jmxName.setCharAt(i, 'n');
-            }
-        }
-        return jmxName;
-    }
 }

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java Tue Mar 15 01:54:07 2011
@@ -213,6 +213,20 @@ public class MBeanInvocationHandlerImpl 
             ObjectName object = (ObjectName) args[0];
             String vhost = object.getKeyProperty("VirtualHost");
             
+            if(vhost != null)
+            {
+                try
+                {
+                    //if the name is quoted in the ObjectName, unquote it
+                    vhost = ObjectName.unquote(vhost);
+                }
+                catch(IllegalArgumentException e)
+                {
+                    //ignore, this just means the name is not quoted
+                    //and can be left unchanged
+                }
+            }
+
             return vhost;
         }
         return null;

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java Tue Mar 15 01:54:07 2011
@@ -63,7 +63,7 @@ public class PluginManager implements Cl
     private static final Logger _logger = Logger.getLogger(PluginManager.class);
 
     private static final int FELIX_STOP_TIMEOUT = 30000;
-    private static final String QPID_VER_SUFFIX = "version=0.9,";
+    private static final String QPID_VER_SUFFIX = "version=0.11,";
 
     private Framework _felix;
 

Modified: qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java?rev=1081634&r1=1081633&r2=1081634&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java (original)
+++ qpid/branches/qpid-2920/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java Tue Mar 15 01:54:07 2011
@@ -20,14 +20,35 @@
  */
 package org.apache.qpid.server.protocol;
 
-import org.apache.qpid.protocol.AMQConstant;
+import java.util.List;
+import java.util.UUID;
+
 import org.apache.qpid.AMQException;
+import org.apache.qpid.protocol.AMQConstant;
+import org.apache.qpid.server.logging.LogSubject;
+import org.apache.qpid.server.stats.StatisticsGatherer;
 
-public interface AMQConnectionModel
+public interface AMQConnectionModel extends StatisticsGatherer
 {
+    /**
+     * get a unique id for this connection.
+     * 
+     * @return a {@link UUID} representing the connection
+     */
+    public UUID getId();
+    
+    /**
+     * Close the underlying Connection
+     * 
+     * @param cause
+     * @param message
+     * @throws org.apache.qpid.AMQException
+     */
+    public void close(AMQConstant cause, String message) throws AMQException;
 
     /**
      * Close the given requested Session
+     * 
      * @param session
      * @param cause
      * @param message
@@ -36,4 +57,16 @@ public interface AMQConnectionModel
     public void closeSession(AMQSessionModel session, AMQConstant cause, String message) throws AMQException;
 
     public long getConnectionId();
+    
+    /**
+     * Get a list of all sessions using this connection.
+     * 
+     * @return a list of {@link AMQSessionModel}s
+     */
+    public List<AMQSessionModel> getSessionModels();
+
+    /**
+     * Return a {@link LogSubject} for the connection.
+     */
+    public LogSubject getLogSubject();
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org