You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2013/02/28 17:14:57 UTC

svn commit: r1451244 [45/45] - in /qpid/branches/asyncstore: ./ bin/ cpp/ cpp/bindings/ cpp/bindings/qmf/ cpp/bindings/qmf/python/ cpp/bindings/qmf/ruby/ cpp/bindings/qmf2/ cpp/bindings/qmf2/examples/cpp/ cpp/bindings/qmf2/python/ cpp/bindings/qmf2/rub...

Modified: qpid/branches/asyncstore/java/test-profiles/testprofile.defaults
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/test-profiles/testprofile.defaults?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/test-profiles/testprofile.defaults (original)
+++ qpid/branches/asyncstore/java/test-profiles/testprofile.defaults Thu Feb 28 16:14:30 2013
@@ -20,7 +20,7 @@ java.naming.factory.initial=org.apache.q
 java.naming.provider.url=${test.profiles}/test-provider.properties
 
 broker.ready=Listening on TCP
-broker.config=build/etc/config-systests.xml
+broker.config=build/etc/config-systests.json
 messagestore.class.name=org.apache.qpid.server.store.MemoryMessageStore
 broker.protocol.excludes=
 broker.persistent=false
@@ -33,13 +33,20 @@ amqj.logging.level=${log}
 amqj.server.logging.level=${log}
 amqj.protocol.logging.level=${log}
 root.logging.level=warn
-log4j.configuration=test-profiles/log4j-test.xml
+
+# System property log4j.configuration is used by log4j.
+# QpidBrokerTestCase uses log4j.configuration.file to construct a java.io.File, eg for log configuration of spawned brokers.
+log4j.configuration.file=${test.profiles}/log4j-test.xml
+log4j.configuration=file:///${log4j.configuration.file}
+
 log4j.debug=false
 
 # Note test-provider.properties also has variables of same name.
 # Keep in sync
 test.port=15672
 test.mport=18999
+test.cport=19099
+test.hport=18080
 #Note : Management will start open second port on: mport + 100 : 19099 
 test.port.ssl=15671
 test.port.alt=25672
@@ -55,5 +62,7 @@ haltonerror=no
 exclude.modules=none
 
 profile.clustered=false
+broker.config-store-type=json
+broker.virtualhosts-config="${QPID_HOME}/etc/virtualhosts-systests.xml"
 
 

Propchange: qpid/branches/asyncstore/java/test-profiles/testprofile.defaults
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/testprofile.defaults:r1375509-1450773

Propchange: qpid/branches/asyncstore/packaging/windows/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/packaging/windows:r1375509-1450773

Modified: qpid/branches/asyncstore/packaging/windows/INSTALL_NOTES.html
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/packaging/windows/INSTALL_NOTES.html?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/packaging/windows/INSTALL_NOTES.html (original)
+++ qpid/branches/asyncstore/packaging/windows/INSTALL_NOTES.html Thu Feb 28 16:14:30 2013
@@ -1,11 +1,11 @@
 <html>
 <head>
-<title>Apache Qpid C++ 0.19 Installation Notes</title>
+<title>Apache Qpid C++ 0.21 Installation Notes</title>
 </head>
 <body>
-<H1>Apache Qpid C++ 0.19 Installation Notes</H1>
+<H1>Apache Qpid C++ 0.21 Installation Notes</H1>
 
-<p>Thank you for installing Apache Qpid version 0.19 for Windows.
+<p>Thank you for installing Apache Qpid version 0.21 for Windows.
 If the requisite features were installed, you can now run a broker,
 use the example programs, and design your own messaging programs while
 reading the Qpid C++ API reference documentation.</p>
@@ -83,7 +83,7 @@ default; therefore, to gain support for 
 must be loaded into the broker. This can be done using the
 <code>--load-module</code> option to load the needed plugins. For example:
 <pre>
-cd "C:\Program Files\Apache\qpidc-0.19"
+cd "C:\Program Files\Apache\qpidc-0.21"
 qpidd.exe --load-module plugins\broker\store.dll --load-module plugins\broker\msclfs_store.dll
 </pre>
 The <code>--load-module</code> option can also take a full path. The option

Modified: qpid/branches/asyncstore/packaging/windows/installer.proj
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/packaging/windows/installer.proj?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/packaging/windows/installer.proj (original)
+++ qpid/branches/asyncstore/packaging/windows/installer.proj Thu Feb 28 16:14:30 2013
@@ -32,11 +32,11 @@
 	<source_root>$(MSBuildProjectDirectory)\..\..</source_root>
 	<staging_dir>$(MSBuildProjectDirectory)\stage</staging_dir>
 	<bits Condition="'$(bits)' == ''">32</bits>
-	<qpid_version>0.19</qpid_version>
+	<qpid_version>0.21</qpid_version>
 	<OutputName>qpidc</OutputName>
 	<OutputType>Package</OutputType>
 	<WixToolPath>C:\Program Files (x86)\Windows Installer XML v3.5\bin</WixToolPath>
-        <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.5\wix.targets</WixTargetsPath>
+        <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\wix.targets</WixTargetsPath>
     </PropertyGroup>
 
     <Choose>
@@ -175,10 +175,10 @@
 
     <Target Name="BuildDotNetBindings"><!-- DependsOnTargets="BuildCpp;BuildCppDebug" -->
         <MSBuild
-            Projects="$(source_root)\cpp\bindings\qpid\dotnet\org.apache.qpid.messaging.sessionreceiver.sln"
+            Projects="$(source_root)\cpp\bindings\qpid\dotnet\msvc9\org.apache.qpid.messaging.sessionreceiver.sln"
             Properties="Configuration=Debug;Platform=$(Architecture)" />
         <MSBuild
-            Projects="$(source_root)\cpp\bindings\qpid\dotnet\org.apache.qpid.messaging.sessionreceiver.sln"
+            Projects="$(source_root)\cpp\bindings\qpid\dotnet\msvc9\org.apache.qpid.messaging.sessionreceiver.sln"
             Properties="Configuration=Release;Platform=$(Architecture)" />
     </Target>
 

Propchange: qpid/branches/asyncstore/packaging/windows/installer.proj
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Feb 28 16:14:30 2013
@@ -0,0 +1,8 @@
+/qpid/branches/0.10/qpid/packaging/windows/installer.proj:1103083
+/qpid/branches/0.18/qpid/packaging/windows/installer.proj:1383225
+/qpid/branches/0.5.x-dev/qpid/packaging/windows/installer.proj:892761,894875
+/qpid/branches/0.6-release-windows-installer/packaging/windows/installer.proj:926803
+/qpid/branches/0.6-release-windows-installer/qpid/packaging/windows/installer.proj:926865,927233
+/qpid/branches/java-network-refactor/qpid/packaging/windows/installer.proj:805429-825319
+/qpid/branches/qpid-2935/qpid/packaging/windows/installer.proj:1061302-1072333
+/qpid/trunk/qpid/packaging/windows/installer.proj:1291265-1368650,1368652-1450773

Modified: qpid/branches/asyncstore/packaging/windows/qpidc.wxs
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/packaging/windows/qpidc.wxs?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/packaging/windows/qpidc.wxs (original)
+++ qpid/branches/asyncstore/packaging/windows/qpidc.wxs Thu Feb 28 16:14:30 2013
@@ -42,11 +42,18 @@
     <PropertyRef Id="NETFRAMEWORK35"/>
 
     <!-- Allow 64-bit builds to pick ProgramFiles64Folder instead -->
-    <?Define ProgramFiles = "ProgramFilesFolder"?>
+    <?define ProgramFiles = "ProgramFilesFolder"?>
+
+    <!-- Pick up Program Files for 32-bit from the correct place -->
+    <?ifdef env.ProgramFiles(x86)?>
+      <?define ProgramFilesx86 = "$(env.ProgramFiles(x86))"?>
+    <?else?>
+      <?define ProgramFilesx86 = "$(env.ProgramFiles)"?>
+    <?endif?>
 
     <Directory Id="TARGETDIR" Name="SourceDir">
-      <Merge Id="VCRedist" SourceFile="C:\Program Files\Common Files\Merge Modules\Microsoft_VC90_CRT_x86.msm" DiskId="1" Language="0"/>
-      <Merge Id="VCRedistPolicy" SourceFile="C:\Program Files\Common Files\Merge Modules\policy_9_0_Microsoft_VC90_CRT_x86.msm" DiskId="1" Language="0"/>
+      <Merge Id="VCRedist" SourceFile="$(var.ProgramFilesx86)\Common Files\Merge Modules\Microsoft_VC90_CRT_x86.msm" DiskId="1" Language="0"/>
+      <Merge Id="VCRedistPolicy" SourceFile="$(var.ProgramFilesx86)\Common Files\Merge Modules\policy_9_0_Microsoft_VC90_CRT_x86.msm" DiskId="1" Language="0"/>
       <Directory Id="$(var.ProgramFiles)">
         <Directory Id="ApacheTop" Name="Apache">
           <Directory Id="INSTALLLOCATION" Name="qpidc-$(var.qpidc_version)">
@@ -105,8 +112,8 @@
         <File Id="InstallNotesHTML" Source="INSTALL_NOTES.html"/>
       </Component>
       <Component Id="Legal" Guid="{D98B2A06-4A7E-488a-A7A9-BFB1B9D594A0}">
-        <File Id="LICENSE" Source="$(var.staging_dir)\LICENSE"/>
-        <File Id="NOTICE"  Source="$(var.staging_dir)\NOTICE"/>
+        <File Id="LICENSE" Source="$(var.staging_dir)\docs\LICENSE"/>
+        <File Id="NOTICE"  Source="$(var.staging_dir)\docs\NOTICE"/>
       </Component>
     </DirectoryRef>
 
@@ -269,7 +276,6 @@
         <ComponentRef Id="TopStorePlugin"/>
         <ComponentRef Id="SQLPersistence"/>
         <ComponentRef Id="CLFSPersistence"/>
-	<ComponentGroupRef Id="group_BoostDlls"/>
       </Feature>
 
       <Feature Id="ClientLib" Title="Client Libraries and Headers to develop and run programs" Level="1">
@@ -293,8 +299,6 @@
         <ComponentRef Id="WCFInteropDLL"/>
         <ComponentRef Id="WCFXADLL"/>
         <ComponentGroupRef Id="group_QpidHeaders"/>
-	<ComponentGroupRef Id="group_BoostHeaders"/>
-        <ComponentGroupRef Id="group_BoostDlls"/>
 
         <Feature Id="Examples" Title="Client Programming Examples" Level="1">
           <ComponentGroupRef Id="group_Examples"/>

Propchange: qpid/branches/asyncstore/python/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/python:r1375509-1450773

Modified: qpid/branches/asyncstore/python/examples/README.txt
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/examples/README.txt?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/examples/README.txt (original)
+++ qpid/branches/asyncstore/python/examples/README.txt Thu Feb 28 16:14:30 2013
@@ -14,6 +14,11 @@ api/spout                  -- A simple m
                               messages to the target specified on the
                               command line.
 
+api/send                   -- Sends messages to a specified queue.
+
+api/receive                -- Receives messages from a specified queue.
+                              Use with the send example above.
+
 api/server                 -- An example server that process incoming
                               messages and sends replies.
 

Modified: qpid/branches/asyncstore/python/qpid/client.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/client.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/client.py (original)
+++ qpid/branches/asyncstore/python/qpid/client.py Thu Feb 28 16:14:30 2013
@@ -18,13 +18,14 @@
 #
 
 """
-An AQMP client implementation that uses a custom delegate for
+An AMQP client implementation that uses a custom delegate for
 interacting with the server.
 """
 
 import os, threading
 from peer import Peer, Channel, Closed
 from delegate import Delegate
+from util import get_client_properties_with_defaults
 from connection08 import Connection, Frame, connect
 from spec08 import load
 from queue import Queue
@@ -76,12 +77,12 @@ class Client:
       self.lock.release()
     return q
 
-  def start(self, response, mechanism="AMQPLAIN", locale="en_US", tune_params=None):
+  def start(self, response, mechanism="AMQPLAIN", locale="en_US", tune_params=None, client_properties=None):
     self.mechanism = mechanism
     self.response = response
     self.locale = locale
     self.tune_params = tune_params
-
+    self.client_properties=get_client_properties_with_defaults(provided_client_properties=client_properties)
     self.socket = connect(self.host, self.port)
     self.conn = Connection(self.socket, self.spec)
     self.peer = Peer(self.conn, ClientDelegate(self), Session)
@@ -128,7 +129,8 @@ class ClientDelegate(Delegate):
   def connection_start(self, ch, msg):
     msg.start_ok(mechanism=self.client.mechanism,
                  response=self.client.response,
-                 locale=self.client.locale)
+                 locale=self.client.locale,
+                 client_properties=self.client.client_properties)
 
   def connection_tune(self, ch, msg):
     if self.client.tune_params:

Modified: qpid/branches/asyncstore/python/qpid/connection08.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/connection08.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/connection08.py (original)
+++ qpid/branches/asyncstore/python/qpid/connection08.py Thu Feb 28 16:14:30 2013
@@ -28,6 +28,9 @@ from cStringIO import StringIO
 from codec import EOF
 from compat import SHUT_RDWR
 from exceptions import VersionError
+from logging import getLogger, DEBUG
+
+log = getLogger("qpid.connection08")
 
 class SockIO:
 
@@ -35,7 +38,8 @@ class SockIO:
     self.sock = sock
 
   def write(self, buf):
-#    print "OUT: %r" % buf
+    if log.isEnabledFor(DEBUG):
+      log.debug("OUT: %r", buf)
     self.sock.sendall(buf)
 
   def read(self, n):
@@ -47,8 +51,9 @@ class SockIO:
         break
       if len(s) == 0:
         break
-#      print "IN: %r" % s
       data += s
+    if log.isEnabledFor(DEBUG):
+      log.debug("IN: %r", data)
     return data
 
   def flush(self):
@@ -120,19 +125,25 @@ class Connection:
                            (self.spec.major, self.spec.minor, major, minor))
       else:
         raise FramingError("unknown frame type: %s" % tid)
-    channel = c.decode_short()
-    body = c.decode_longstr()
-    dec = codec.Codec(StringIO(body), self.spec)
-    frame = Frame.DECODERS[type].decode(self.spec, dec, len(body))
-    frame.channel = channel
-    end = c.decode_octet()
-    if end != self.FRAME_END:
-      garbage = ""
-      while end != self.FRAME_END:
-        garbage += chr(end)
-        end = c.decode_octet()
-      raise "frame error: expected %r, got %r" % (self.FRAME_END, garbage)
-    return frame
+    try:
+      channel = c.decode_short()
+      body = c.decode_longstr()
+      dec = codec.Codec(StringIO(body), self.spec)
+      frame = Frame.DECODERS[type].decode(self.spec, dec, len(body))
+      frame.channel = channel
+      end = c.decode_octet()
+      if end != self.FRAME_END:
+	garbage = ""
+	while end != self.FRAME_END:
+	  garbage += chr(end)
+	  end = c.decode_octet()
+	raise "frame error: expected %r, got %r" % (self.FRAME_END, garbage)
+      return frame
+    except EOF:
+      # An EOF caught here can indicate an error decoding the frame,
+      # rather than that a disconnection occurred,so it's worth logging it.
+      log.exception("Error occurred when reading frame with tid %s" % tid)
+      raise
 
   def write_0_9(self, frame):
     self.write_8_0(frame)

Modified: qpid/branches/asyncstore/python/qpid/delegates.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/delegates.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/delegates.py (original)
+++ qpid/branches/asyncstore/python/qpid/delegates.py Thu Feb 28 16:14:30 2013
@@ -18,7 +18,7 @@
 #
 
 import os, connection, session
-from util import notify
+from util import notify, get_client_properties_with_defaults
 from datatypes import RangedSet
 from exceptions import VersionError, Closed
 from logging import getLogger
@@ -137,24 +137,12 @@ class Server(Delegate):
 
 class Client(Delegate):
 
-  ppid = 0
-  try:
-    ppid = os.getppid()
-  except:
-    pass
-
-  PROPERTIES = {"product": "qpid python client",
-                "version": "development",
-                "platform": os.name,
-                "qpid.client_process": os.path.basename(sys.argv[0]),
-                "qpid.client_pid": os.getpid(),
-                "qpid.client_ppid": ppid}
-
   def __init__(self, connection, username=None, password=None,
                mechanism=None, heartbeat=None, **kwargs):
     Delegate.__init__(self, connection)
-    self.client_properties=Client.PROPERTIES.copy()
-    self.client_properties.update(kwargs.get("client_properties",{}))
+    provided_client_properties = kwargs.get("client_properties")
+    self.client_properties=get_client_properties_with_defaults(provided_client_properties)
+
     ##
     ## self.acceptableMechanisms is the list of SASL mechanisms that the client is willing to
     ## use.  If it's None, then any mechanism is acceptable.

Modified: qpid/branches/asyncstore/python/qpid/messaging/driver.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/messaging/driver.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/messaging/driver.py (original)
+++ qpid/branches/asyncstore/python/qpid/messaging/driver.py Thu Feb 28 16:14:30 2013
@@ -31,7 +31,7 @@ from qpid.messaging.exceptions import *
 from qpid.messaging.message import get_codec, Disposition, Message
 from qpid.ops import *
 from qpid.selector import Selector
-from qpid.util import URL, default
+from qpid.util import URL, default,get_client_properties_with_defaults
 from qpid.validator import And, Context, List, Map, Types, Values
 from threading import Condition, Thread
 
@@ -90,20 +90,6 @@ SUBJECT_DEFAULTS = {
   "topic": "#"
   }
 
-# XXX
-ppid = 0
-try:
-  ppid = os.getppid()
-except:
-  pass
-
-CLIENT_PROPERTIES = {"product": "qpid python client",
-                     "version": "development",
-                     "platform": os.name,
-                     "qpid.client_process": os.path.basename(sys.argv[0]),
-                     "qpid.client_pid": os.getpid(),
-                     "qpid.client_ppid": ppid}
-
 def noop(): pass
 def sync_noop(): pass
 
@@ -710,8 +696,7 @@ class Engine:
     except sasl.SASLError, e:
       raise AuthenticationFailure(text=str(e))
 
-    client_properties = CLIENT_PROPERTIES.copy()
-    client_properties.update(self.connection.client_properties)
+    client_properties = get_client_properties_with_defaults(provided_client_properties=self.connection.client_properties);
     self.write_op(ConnectionStartOk(client_properties=client_properties,
                                     mechanism=mech, response=initial))
 

Modified: qpid/branches/asyncstore/python/qpid/messaging/endpoints.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/messaging/endpoints.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/messaging/endpoints.py (original)
+++ qpid/branches/asyncstore/python/qpid/messaging/endpoints.py Thu Feb 28 16:14:30 2013
@@ -871,7 +871,7 @@ class Sender(Endpoint):
     self.queued += 1
 
     if sync:
-      self.sync()
+      self.sync(timeout=timeout)
       assert message not in self.session.outgoing
     else:
       self._wakeup()

Modified: qpid/branches/asyncstore/python/qpid/messaging/transports.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/messaging/transports.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/messaging/transports.py (original)
+++ qpid/branches/asyncstore/python/qpid/messaging/transports.py Thu Feb 28 16:14:30 2013
@@ -55,7 +55,41 @@ try:
   from ssl import wrap_socket, SSLError, SSL_ERROR_WANT_READ, \
       SSL_ERROR_WANT_WRITE
 except ImportError:
-  pass
+
+  ## try the older python SSL api:
+  from socket import ssl
+
+  class old_ssl(SocketTransport):
+    def __init__(self, conn, host, port):
+      SocketTransport.__init__(self, conn, host, port)
+      # Bug (QPID-4337): this is the "old" version of python SSL.
+      # The private key is required. If a certificate is given, but no
+      # keyfile, assume the key is contained in the certificate
+      ssl_keyfile = conn.ssl_keyfile
+      ssl_certfile = conn.ssl_certfile
+      if ssl_certfile and not ssl_keyfile:
+        ssl_keyfile = ssl_certfile
+      self.ssl = ssl(self.socket, keyfile=ssl_keyfile, certfile=ssl_certfile)
+      self.socket.setblocking(1)
+
+    def reading(self, reading):
+      return reading
+
+    def writing(self, writing):
+      return writing
+
+    def recv(self, n):
+      return self.ssl.read(n)
+
+    def send(self, s):
+      return self.ssl.write(s)
+
+    def close(self):
+      self.socket.close()
+
+  TRANSPORTS["ssl"] = old_ssl
+  TRANSPORTS["tcp+tls"] = old_ssl
+    
 else:
   class tls(SocketTransport):
 

Modified: qpid/branches/asyncstore/python/qpid/testlib.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/testlib.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/testlib.py (original)
+++ qpid/branches/asyncstore/python/qpid/testlib.py Thu Feb 28 16:14:30 2013
@@ -73,7 +73,7 @@ class TestBase(unittest.TestCase):
         else:
             self.client.close()
 
-    def connect(self, host=None, port=None, user=None, password=None, tune_params=None):
+    def connect(self, host=None, port=None, user=None, password=None, tune_params=None, client_properties=None):
         """Create a new connction, return the Client object"""
         host = host or self.config.broker.host
         port = port or self.config.broker.port or 5672
@@ -82,9 +82,9 @@ class TestBase(unittest.TestCase):
         client = qpid.client.Client(host, port)
         try:
             if client.spec.major == 8 and client.spec.minor == 0:
-                client.start({"LOGIN": user, "PASSWORD": password}, tune_params=tune_params)
+                client.start({"LOGIN": user, "PASSWORD": password}, tune_params=tune_params, client_properties=client_properties)
             else:
-                client.start("\x00" + user + "\x00" + password, mechanism="PLAIN", tune_params=tune_params)
+                client.start("\x00" + user + "\x00" + password, mechanism="PLAIN", tune_params=tune_params, client_properties=client_properties)
         except qpid.client.Closed, e:
             if isinstance(e.args[0], VersionError):
                 raise Skipped(e.args[0])

Modified: qpid/branches/asyncstore/python/qpid/tests/__init__.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/tests/__init__.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/tests/__init__.py (original)
+++ qpid/branches/asyncstore/python/qpid/tests/__init__.py Thu Feb 28 16:14:30 2013
@@ -37,6 +37,7 @@ import qpid.tests.datatypes
 import qpid.tests.connection
 import qpid.tests.spec010
 import qpid.tests.codec010
+import qpid.tests.util
 
 class TestTestsXXX(Test):
 

Modified: qpid/branches/asyncstore/python/qpid/util.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/qpid/util.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/qpid/util.py (original)
+++ qpid/branches/asyncstore/python/qpid/util.py Thu Feb 28 16:14:30 2013
@@ -17,15 +17,19 @@
 # under the License.
 #
 
-import os, socket, time, textwrap, re
+import os, socket, time, textwrap, re, sys
 
 try:
   from ssl import wrap_socket as ssl
 except ImportError:
   from socket import ssl as wrap_socket
   class ssl:
-
     def __init__(self, sock, keyfile=None, certfile=None, trustfile=None):
+      # Bug (QPID-4337): this is the "old" version of python SSL.
+      # The private key is required. If a certificate is given, but no
+      # keyfile, assume the key is contained in the certificate
+      if certfile and not keyfile:
+        keyfile = certfile
       self.sock = sock
       self.ssl = wrap_socket(sock, keyfile=keyfile, certfile=certfile)
 
@@ -38,6 +42,24 @@ except ImportError:
     def close(self):
       self.sock.close()
 
+def get_client_properties_with_defaults(provided_client_properties={}):
+  ppid = 0
+  try:
+    ppid = os.getppid()
+  except:
+    pass
+
+  client_properties = {"product": "qpid python client",
+                       "version": "development",
+                       "platform": os.name,
+                       "qpid.client_process": os.path.basename(sys.argv[0]),
+                       "qpid.client_pid": os.getpid(),
+                       "qpid.client_ppid": ppid}
+
+  if provided_client_properties:
+    client_properties.update(provided_client_properties)
+  return client_properties
+
 def connect(host, port):
   for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
     af, socktype, proto, canonname, sa = res

Modified: qpid/branches/asyncstore/python/setup.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/python/setup.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/python/setup.py (original)
+++ qpid/branches/asyncstore/python/setup.py Thu Feb 28 16:14:30 2013
@@ -298,7 +298,7 @@ class install_lib(_install_lib):
     return outfiles + extra
 
 setup(name="qpid-python",
-      version="0.19",
+      version="0.21",
       author="Apache Qpid",
       author_email="dev@qpid.apache.org",
       packages=["mllib", "qpid", "qpid.messaging", "qpid.tests",

Modified: qpid/branches/asyncstore/specs/management-schema.xml
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/specs/management-schema.xml?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/specs/management-schema.xml (original)
+++ qpid/branches/asyncstore/specs/management-schema.xml Thu Feb 28 16:14:30 2013
@@ -81,6 +81,7 @@
     <property name="systemRef"        type="objId"  references="System" access="RO" desc="System ID" parentRef="y"/>
     <property name="port"             type="uint16" access="RO" desc="TCP Port for AMQP Service"/>
     <property name="workerThreads"    type="uint16" access="RO" desc="Thread pool size"/>
+    <property name="maxConns"         type="uint16" access="RO" desc="Maximum allowed connections"/>
     <property name="connBacklog"      type="uint16" access="RO" desc="Connection backlog limit for listening socket"/>
     <property name="stagingThreshold" type="uint32" access="RO" desc="Broker stages messages over this size to disk"/>
     <property name="mgmtPublish"      type="bool"   access="RO" desc="Broker's management agent sends unsolicited data on the publish interval"/>
@@ -153,7 +154,7 @@
       <arg name="level"     dir="O" type="sstr"/>
     </method>
 
-    <method name="getTimestampConfig" desc="Get the message timestamping configuration">
+   <method name="getTimestampConfig" desc="Get the message timestamping configuration">
       <arg name="receive" dir="O" type="bool"  desc="True if received messages are timestamped."/>
     </method>
 
@@ -180,6 +181,14 @@
       <arg name="results" dir="O" type="map"  desc="A snapshot of the object's state."/>
     </method>
 
+    <method name="getLogHiresTimestamp" desc="Get the high resolution timestamp in logs">
+      <arg name="logHires" dir="O" type="bool"  desc="True if high resolution timestamp in logs is enabled."/>
+    </method>
+
+    <method name="setLogHiresTimestamp" desc="Set the high resolution timestamp in logs">
+      <arg name="logHires" dir="I" type="bool"  desc="True to enable enable high resolution timestamp in logs."/>
+    </method>
+
 
   </class>
 
@@ -357,6 +366,8 @@
     <property name="shadow"             type="bool"   access="RO" desc="True for shadow connections"/>
     <property name="saslMechanism"      type="sstr"   access="RO" desc="SASL mechanism"/>
     <property name="saslSsf"            type="uint16"   access="RO" desc="SASL security strength factor"/>
+    <property name="remoteProperties"   type="map"    access="RO" desc="optional map of identifying information sent by the remote"/>
+    <property name="protocol"           type="sstr"   access="RC" desc="protocol in use"/>
     <statistic name="closing"          type="bool" desc="This client is closing by management request"/>
     <statistic name="framesFromClient" type="count64"/>
     <statistic name="framesToClient"   type="count64"/>
@@ -496,11 +507,12 @@
     <arg name="user"    type="sstr"   desc="Authentication identity"/>
     <arg name="msgDepth" type="count64" desc="Current size of queue in messages"/>
     <arg name="byteDepth" type="count64" desc="Current size of queue in bytes"/>
+    <arg name="properties" type="map" desc="optional identifying information sent by the remote"/>
   </eventArguments>
 
-  <event name="clientConnect"     sev="inform" args="rhost, user"/>
-  <event name="clientConnectFail" sev="warn"   args="rhost, user, reason"/>
-  <event name="clientDisconnect"  sev="inform" args="rhost, user"/>
+  <event name="clientConnect"     sev="inform" args="rhost, user, properties"/>
+  <event name="clientConnectFail" sev="warn"   args="rhost, user, reason, properties"/>
+  <event name="clientDisconnect"  sev="inform" args="rhost, user, properties"/>
   <event name="brokerLinkUp"      sev="inform" args="rhost"/>
   <event name="brokerLinkDown"    sev="warn"   args="rhost"/>
   <event name="queueDeclare"      sev="inform" args="rhost, user, qName, durable, excl, autoDel, altEx, args, disp"/>

Modified: qpid/branches/asyncstore/tests/setup.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tests/setup.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tests/setup.py (original)
+++ qpid/branches/asyncstore/tests/setup.py Thu Feb 28 16:14:30 2013
@@ -20,7 +20,7 @@
 from distutils.core import setup
 
 setup(name="qpid-tests",
-      version="0.19",
+      version="0.21",
       author="Apache Qpid",
       author_email="dev@qpid.apache.org",
       packages=["qpid_tests", "qpid_tests.broker_0_10", "qpid_tests.broker_0_9",

Modified: qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_10/management.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_10/management.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_10/management.py (original)
+++ qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_10/management.py Thu Feb 28 16:14:30 2013
@@ -140,6 +140,30 @@ class ManagementTest (TestBase010):
                 return exchange
         return None
 
+    def test_move_queued_messages_empty(self):
+        """
+        Test that moving messages from an empty queue does not cause an error.
+        """
+        self.startQmf()
+        session = self.session
+        "Set up source queue"
+        session.queue_declare(queue="src-queue-empty", exclusive=True, auto_delete=True)
+
+        "Set up destination queue"
+        session.queue_declare(queue="dest-queue-empty", exclusive=True, auto_delete=True)
+
+        queues = self.qmf.getObjects(_class="queue")
+
+        "Move all messages from src-queue-empty to dest-queue-empty"
+        result = self.qmf.getObjects(_class="broker")[0].queueMoveMessages("src-queue-empty", "dest-queue-empty", 0, {})
+        self.assertEqual (result.status, 0) 
+
+        sq = self.qmf.getObjects(_class="queue", name="src-queue-empty")[0]
+        dq = self.qmf.getObjects(_class="queue", name="dest-queue-empty")[0]
+
+        self.assertEqual (sq.msgDepth,0)
+        self.assertEqual (dq.msgDepth,0)
+
     def test_move_queued_messages(self):
         """
         Test ability to move messages from the head of one queue to another.

Modified: qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_8/basic.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_8/basic.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_8/basic.py (original)
+++ qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_8/basic.py Thu Feb 28 16:14:30 2013
@@ -79,6 +79,51 @@ class BasicTests(TestBase):
         except Closed, e:
             self.assertChannelException(403, e.args[0])
 
+    def test_reconnect_to_durable_subscription(self):
+      try:
+        publisherchannel = self.channel
+        my_id = "my_id"
+        consumer_connection_properties_with_instance = {"instance": my_id}
+        queue_for_subscription = "queue_for_subscription_%s" % my_id
+        topic_name = "my_topic_name"
+        test_message = self.uniqueString()
+
+        durable_subscription_client = self.connect(client_properties=consumer_connection_properties_with_instance)
+        consumerchannel = durable_subscription_client.channel(1)
+        consumerchannel.channel_open()
+
+        self._declare_and_bind_exclusive_queue_on_topic_exchange(consumerchannel, queue_for_subscription, topic_name)
+
+        # disconnect
+        durable_subscription_client.close()
+
+        # send message to topic
+        publisherchannel.basic_publish(routing_key=topic_name, exchange="amq.topic", content=Content(test_message))
+
+        # reconnect and consume message
+        durable_subscription_client = self.connect(client_properties=consumer_connection_properties_with_instance)
+        consumerchannel = durable_subscription_client.channel(1)
+        consumerchannel.channel_open()
+
+        self._declare_and_bind_exclusive_queue_on_topic_exchange(consumerchannel, queue_for_subscription, topic_name)
+
+        # Create consumer and consume the message that was sent whilst subscriber was disconnected.  By convention we
+        # declare the consumer as exclusive to forbid concurrent access.
+        subscription = consumerchannel.basic_consume(queue=queue_for_subscription, exclusive=True)
+        queue = durable_subscription_client.queue(subscription.consumer_tag)
+
+        # consume and verify message content
+        msg = queue.get(timeout=1)
+        self.assertEqual(test_message, msg.content.body)
+        consumerchannel.basic_ack(delivery_tag=msg.delivery_tag)
+      finally:
+        publisherchannel.queue_delete(queue=queue_for_subscription)
+        durable_subscription_client.close()
+
+    def _declare_and_bind_exclusive_queue_on_topic_exchange(self, channel, queue, topic_name):
+        channel.queue_declare(queue=queue, exclusive=True, auto_delete=False, durable=True)
+        channel.queue_bind(exchange="amq.topic", queue=queue, routing_key=topic_name)
+
     def test_consume_queue_errors(self):
         """
         Test error conditions associated with the queue field of the consume method:
@@ -129,7 +174,7 @@ class BasicTests(TestBase):
         myqueue = self.client.queue("my-consumer")
         msg = myqueue.get(timeout=1)
         self.assertEqual("One", msg.content.body)
-	
+
         #cancel should stop messages being delivered
         channel.basic_cancel(consumer_tag="my-consumer")
         channel.basic_publish(routing_key="test-queue-4", content=Content("Two"))

Modified: qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_9/__init__.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_9/__init__.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_9/__init__.py (original)
+++ qpid/branches/asyncstore/tests/src/py/qpid_tests/broker_0_9/__init__.py Thu Feb 28 16:14:30 2013
@@ -19,4 +19,4 @@
 # under the License.
 #
 
-import query, queue
+import query, queue, messageheader

Modified: qpid/branches/asyncstore/tools/setup.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tools/setup.py?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tools/setup.py (original)
+++ qpid/branches/asyncstore/tools/setup.py Thu Feb 28 16:14:30 2013
@@ -20,7 +20,7 @@
 from distutils.core import setup
 
 setup(name="qpid-tools",
-      version="0.19",
+      version="0.21",
       author="Apache Qpid",
       author_email="dev@qpid.apache.org",
       package_dir={'' : 'src/py'},

Modified: qpid/branches/asyncstore/tools/src/py/qpid-cluster
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tools/src/py/qpid-cluster?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tools/src/py/qpid-cluster (original)
+++ qpid/branches/asyncstore/tools/src/py/qpid-cluster Thu Feb 28 16:14:30 2013
@@ -244,6 +244,7 @@ def main(argv=None):
         parser.add_option("-t", "--timeout", action="store", type="int", default=10, metavar="SECS", help="Maximum time to wait for broker connection (in seconds)")
         parser.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.")
         parser.add_option("--ssl-certificate", action="store", type="string", metavar="<cert>", help="Client SSL certificate (PEM Format)")
+        parser.add_option("--ssl-key", action="store", type="string", metavar="<key>", help="Client SSL private key (PEM Format)")
         parser.add_option("-C", "--all-connections", action="store_true", default=False, help="View client connections to all cluster members")
         parser.add_option("-c", "--connections",  metavar="ID", help="View client connections to specified member")
         parser.add_option("-d", "--del-connection",  metavar="HOST:PORT", help="Disconnect a client connection")
@@ -280,6 +281,9 @@ def main(argv=None):
             if len(config._stopId.split(":")) != 2:
                 parser.error("Member ID must be of form: <host or ip>:<number>")
 
+        if opts.ssl_key and not opts.ssl_certificate:
+            parser.error("missing '--ssl-certificate' (required by '--ssl-key')")
+
         config._stopAll = opts.all_stop
         config._force = opts.force
         config._numeric = opts.numeric
@@ -289,6 +293,8 @@ def main(argv=None):
             conn_options['mechanisms'] = opts.sasl_mechanism
         if opts.ssl_certificate:
             conn_options['ssl_certfile'] = opts.ssl_certificate
+        if opts.ssl_key:
+            conn_options['ssl_keyfile'] = opts.ssl_key
 
         bm = BrokerManager(config, conn_options)
 

Modified: qpid/branches/asyncstore/tools/src/py/qpid-config
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tools/src/py/qpid-config?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tools/src/py/qpid-config (original)
+++ qpid/branches/asyncstore/tools/src/py/qpid-config Thu Feb 28 16:14:30 2013
@@ -174,7 +174,8 @@ def OptionsAndArguments(argv):
     group1 = OptionGroup(parser, "General Options")
     group1.add_option("-t", "--timeout", action="store", type="int", default=10, metavar="<secs>", help="Maximum time to wait for broker connection (in seconds)")
     group1.add_option("-r", "--recursive", action="store_true", help="Show bindings in queue or exchange list")
-    group1.add_option("-b", "--broker", action="store", type="string", default="localhost:5672", metavar="<address>", help="Address of qpidd broker with syntax: [username/password@] hostname | ip-address [:<port>]")
+    group1.add_option("-b", "--broker", action="store", type="string", metavar="<address>", help="Address of qpidd broker with syntax: [username/password@] hostname | ip-address [:<port>]")
+    group1.add_option("-a", "--broker-addr", action="store", type="string", metavar="<address>")
     group1.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.")
     group1.add_option("--ssl-certificate", action="store", type="string", metavar="<cert>", help="Client SSL certificate (PEM Format)")
     group1.add_option("--ssl-key", action="store", type="string", metavar="<key>", help="Client SSL private key (PEM Format)")
@@ -245,6 +246,9 @@ def OptionsAndArguments(argv):
         config._recursive = True
     if opts.broker:
         config._host = opts.broker
+    if opts.broker_addr:
+        config._host = opts.broker_addr
+    if config._host is None: config._host="localhost:5672"
     if opts.timeout is not None:
         config._connTimeout = opts.timeout
         if config._connTimeout == 0:
@@ -313,7 +317,9 @@ def OptionsAndArguments(argv):
     if opts.ssl_certificate:
         conn_options['ssl_certfile'] = opts.ssl_certificate
     if opts.ssl_key:
-        conn_options['ssl_key'] = opts.ssl_key
+        if not opts.ssl_certificate:
+            parser.error("missing '--ssl-certificate' (required by '--ssl-key')")
+        conn_options['ssl_keyfile'] = opts.ssl_key
     if opts.ha_admin:
         conn_options['client_properties'] = {'qpid.ha-admin' : 1}
 

Modified: qpid/branches/asyncstore/tools/src/py/qpid-ha
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tools/src/py/qpid-ha?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tools/src/py/qpid-ha (original)
+++ qpid/branches/asyncstore/tools/src/py/qpid-ha Thu Feb 28 16:14:30 2013
@@ -61,7 +61,9 @@ class Command:
         if opts.ssl_certificate:
             conn_options['ssl_certfile'] = opts.ssl_certificate
         if opts.ssl_key:
-            conn_options['ssl_key'] = opts.ssl_key
+            if not opts.ssl_certificate:
+                self.op.error("missing '--ssl-certificate' (required by '--ssl-key')")
+            conn_options['ssl_keyfile'] = opts.ssl_key
         conn_options['client_properties'] = {'qpid.ha-admin' : 1}
 
         connection = Connection.establish(opts.broker, **conn_options)
@@ -86,8 +88,13 @@ class StatusCmd(Command):
         Command.__init__(self, "status", "Print HA status")
         self.op.add_option(
             "--expect", type="string", metavar="<status>",
-            help="Don't print status but return 0 if it matches <status>, 1 otherwise")
+            help="Don't print status. Return 0 if it matches <status>, 1 otherwise")
+        self.op.add_option(
+            "--is-primary", action="store_true", default=False,
+            help="Don't print status. Return 0 if the broker is primary, 1 otherwise")
     def do_execute(self, qmf_broker, ha_broker, opts, args):
+        if opts.is_primary:
+            if not ha_broker.status in ["active", "recovering"]: raise ExitStatus(1)
         if opts.expect:
             if opts.expect != ha_broker.status: raise ExitStatus(1)
         else:

Modified: qpid/branches/asyncstore/tools/src/py/qpid-printevents
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tools/src/py/qpid-printevents?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tools/src/py/qpid-printevents (original)
+++ qpid/branches/asyncstore/tools/src/py/qpid-printevents Thu Feb 28 16:14:30 2013
@@ -72,7 +72,7 @@ class EventReceiver(Thread):
     isOpen = False
     while self.running:
       try:
-        conn = Connection.establish(self.url, **options)
+        conn = Connection.establish(self.url, **self.options)
         isOpen = True
         self.printer.pr(strftime("%c", gmtime(time())) + " NOTIC qpid-printevents:brokerConnected broker=%s" % self.url)
 
@@ -150,7 +150,9 @@ def main(argv=None):
   if options.ssl_certificate:
     conn_options['ssl_certfile'] = options.ssl_certificate
   if options.ssl_key:
-    conn_options['ssl_key'] = options.ssl_key
+    if not options.ssl_certificate:
+      p.error("missing '--ssl-certificate' (required by '--ssl-key')")
+    conn_options['ssl_keyfile'] = options.ssl_key
   if options.ha_admin:
     props['qpid.ha-admin'] = 1
   if options.heartbeats:

Modified: qpid/branches/asyncstore/tools/src/py/qpid-queue-stats
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tools/src/py/qpid-queue-stats?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tools/src/py/qpid-queue-stats (original)
+++ qpid/branches/asyncstore/tools/src/py/qpid-queue-stats Thu Feb 28 16:14:30 2013
@@ -127,6 +127,7 @@ def main(argv=None):
   p.add_option('--filter','-f' ,default=None ,help='a list of comma separated queue names (regex are accepted) to show')
   p.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.")
   p.add_option("--ssl-certificate", action="store", type="string", metavar="<cert>", help="Client SSL certificate (PEM Format)")
+  p.add_option("--ssl-key", action="store", type="string", metavar="<key>", help="Client SSL private key (PEM Format)")
 
   options, arguments = p.parse_args(args=argv)
 
@@ -135,6 +136,10 @@ def main(argv=None):
     conn_options['mechanisms'] = options.sasl_mechanism
   if options.ssl_certificate:
     conn_options['ssl_certfile'] = options.ssl_certificate
+  if options.ssl_key:
+    if not options.ssl_certificate:
+      p.error("missing '--ssl-certificate' (required by '--ssl-key')")
+    conn_options['ssl_keyfile'] = options.ssl_key
 
   host = options.broker_address
   filter = []

Modified: qpid/branches/asyncstore/tools/src/py/qpid-route
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tools/src/py/qpid-route?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tools/src/py/qpid-route (original)
+++ qpid/branches/asyncstore/tools/src/py/qpid-route Thu Feb 28 16:14:30 2013
@@ -97,6 +97,7 @@ def OptionsAndArguments(argv):
 
     parser.add_option("--client-sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). Used when the client connects to the destination broker (not for authentication between the source and destination brokers - that is specified using the [mechanisms] argument to 'add route'). SASL automatically picks the most secure available mechanism - use this option to override.")
     parser.add_option("--ssl-certificate", action="store", type="string", metavar="<cert>", help="Client SSL certificate (PEM Format)")
+    parser.add_option("--ssl-key", action="store", type="string", metavar="<key>", help="Client SSL private key (PEM Format)")
     parser.add_option("--ha-admin", action="store_true", help="Allow connection to a HA backup broker.")
     opts, encArgs = parser.parse_args(args=argv)
 
@@ -141,6 +142,11 @@ def OptionsAndArguments(argv):
     if opts.ssl_certificate:
         config._conn_options['ssl_certfile'] = opts.ssl_certificate
 
+    if opts.ssl_key:
+        if not opts.ssl_certificate:
+            parser.error("missing '--ssl-certificate' (required by '--ssl-key')")
+        config._conn_options['ssl_keyfile'] = opts.ssl_key
+
     return args
 
 

Modified: qpid/branches/asyncstore/tools/src/py/qpid-stat
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/tools/src/py/qpid-stat?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/tools/src/py/qpid-stat (original)
+++ qpid/branches/asyncstore/tools/src/py/qpid-stat Thu Feb 28 16:14:30 2013
@@ -108,7 +108,9 @@ def OptionsAndArguments(argv):
     if opts.ssl_certificate:
         conn_options['ssl_certfile'] = opts.ssl_certificate
     if opts.ssl_key:
-        conn_options['ssl_key'] = opts.ssl_key
+        if not opts.ssl_certificate:
+            parser.error("missing '--ssl-certificate' (required by '--ssl-key')")
+        conn_options['ssl_keyfile'] = opts.ssl_key
     if opts.ha_admin:
         conn_options['client_properties'] = {'qpid.ha-admin' : 1}
 
@@ -156,7 +158,7 @@ class BrokerManager:
         shutting down.
         """
         try:
-            connection.close()
+            self.connection.close()
         except:
             pass
 
@@ -200,17 +202,21 @@ class BrokerManager:
         disp = Display(prefix="  ")
         heads = []
         heads.append(Header('uptime', Header.DURATION))
+        heads.append(Header('cluster', Header.NONE))
         heads.append(Header('connections', Header.COMMAS))
         heads.append(Header('sessions', Header.COMMAS))
         heads.append(Header('exchanges', Header.COMMAS))
         heads.append(Header('queues', Header.COMMAS))
         rows = []
         broker = self.broker.getBroker()
+        cluster = self.broker.getCluster()
+        clusterInfo = cluster and cluster.clusterName + "<" + cluster.status + ">" or "<standalone>"
         connections = self.getConnectionMap()
         sessions = self.getSessionMap()
         exchanges = self.getExchangeMap()
         queues = self.getQueueMap()
         row = (broker.getUpdateTime() - broker.getCreateTime(),
+               clusterInfo,
                len(connections), len(sessions),
                len(exchanges), len(queues))
         rows.append(row)

Modified: qpid/branches/asyncstore/wcf/samples/Channel/HelloWorld/HelloWorld.cs
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/wcf/samples/Channel/HelloWorld/HelloWorld.cs?rev=1451244&r1=1451243&r2=1451244&view=diff
==============================================================================
--- qpid/branches/asyncstore/wcf/samples/Channel/HelloWorld/HelloWorld.cs (original)
+++ qpid/branches/asyncstore/wcf/samples/Channel/HelloWorld/HelloWorld.cs Thu Feb 28 16:14:30 2013
@@ -113,6 +113,7 @@ namespace Apache.Qpid.Samples.Channel.He
             byte[] binaryContent = Encoding.UTF8.GetBytes("Hello world!");
             writer.WriteStartElement("Binary");
             writer.WriteBase64(binaryContent, 0, binaryContent.Length);
+            writer.WriteEndElement();
         }
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org