You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2012/11/19 13:48:08 UTC

svn commit: r1411155 [6/6] - in /qpid/branches/java-broker-config-qpid-4390/qpid: ./ cpp/ cpp/bindings/ cpp/bindings/qpid/dotnet/ cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/ cpp/bindings/qpid/dotnet/msvc9/ cpp/bindings/qpid/dotnet/s...

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java Mon Nov 19 12:47:53 2012
@@ -53,6 +53,7 @@ import org.apache.qpid.client.messaging.
 import org.apache.qpid.client.messaging.address.Link;
 import org.apache.qpid.client.messaging.address.Link.SubscriptionQueue;
 import org.apache.qpid.client.messaging.address.Node;
+import org.apache.qpid.common.AMQPFilterTypes;
 import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.FieldTable;
@@ -624,7 +625,9 @@ public class AMQSession_0_10 extends AMQ
         {
             if (AMQDestination.TOPIC_TYPE == consumer.getDestination().getAddressType())
             {
-                createSubscriptionQueue(consumer.getDestination(), consumer.isNoLocal());
+                String selector =  consumer.getMessageSelectorFilter() == null? null : consumer.getMessageSelectorFilter().getSelector();
+
+                createSubscriptionQueue(consumer.getDestination(), consumer.isNoLocal(), selector);
                 queueName = consumer.getDestination().getAMQQueueName();
                 consumer.setQueuename(queueName);
             }
@@ -1300,8 +1303,8 @@ public class AMQSession_0_10 extends AMQ
             }
         }
     }
-    
-    void createSubscriptionQueue(AMQDestination dest, boolean noLocal) throws AMQException
+
+    void createSubscriptionQueue(AMQDestination dest, boolean noLocal, String messageSelector) throws AMQException
     {
         Link link = dest.getLink();
         String queueName = dest.getQueueName();
@@ -1325,12 +1328,14 @@ public class AMQSession_0_10 extends AMQ
                 link.isDurable() ? Option.DURABLE : Option.NONE,
                 queueProps.isExclusive() ? Option.EXCLUSIVE : Option.NONE);
 
+        Map<String,Object> bindingArguments = new HashMap<String, Object>();
+        bindingArguments.put(AMQPFilterTypes.JMS_SELECTOR.getValue().toString(), messageSelector == null ? "" : messageSelector);
         getQpidSession().exchangeBind(queueName,
-        		              dest.getAddressName(), 
-        		              dest.getSubject(), 
-        		              Collections.<String,Object>emptyMap());
+                              dest.getAddressName(),
+                              dest.getSubject(),
+                              bindingArguments);
     }
-    
+
     public void setLegacyFieldsForQueueType(AMQDestination dest)
     {
         // legacy support

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionCloseMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionCloseMethodHandler.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionCloseMethodHandler.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionCloseMethodHandler.java Mon Nov 19 12:47:53 2012
@@ -36,6 +36,7 @@ import org.apache.qpid.framing.Connectio
 import org.apache.qpid.framing.ConnectionCloseOkBody;
 import org.apache.qpid.protocol.AMQConstant;
 import org.apache.qpid.transport.Sender;
+import org.apache.qpid.transport.TransportException;
 
 public class ConnectionCloseMethodHandler implements StateAwareMethodListener<ConnectionCloseBody>
 {
@@ -102,7 +103,16 @@ public class ConnectionCloseMethodHandle
             }
 
             // Close the open TCP connection
-            sender.close();
+            try
+            {
+                sender.close();
+            }
+            catch(TransportException e)
+            {
+                //Ignore, they are already logged by the Sender and this
+                //is a connection-close being processed by the IoReceiver
+                //which will as it closes initiate failover if necessary.
+            }
         }
     }
 

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java Mon Nov 19 12:47:53 2012
@@ -56,6 +56,7 @@ import org.apache.qpid.protocol.AMQMetho
 import org.apache.qpid.protocol.ProtocolEngine;
 import org.apache.qpid.thread.Threading;
 import org.apache.qpid.transport.Sender;
+import org.apache.qpid.transport.TransportException;
 import org.apache.qpid.transport.network.NetworkConnection;
 
 import java.io.IOException;
@@ -67,7 +68,6 @@ import java.util.Set;
 import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
 
 /**
  * AMQProtocolHandler is the client side protocol handler for AMQP, it handles all protocol events received from the
@@ -317,17 +317,29 @@ public class AMQProtocolHandler implemen
      */
     public void exception(Throwable cause)
     {
-        boolean connectionClosed = (cause instanceof AMQConnectionClosedException || cause instanceof IOException);
-        if (connectionClosed)
+        boolean causeIsAConnectionProblem =
+                cause instanceof AMQConnectionClosedException ||
+                cause instanceof IOException ||
+                cause instanceof TransportException;
+
+        if (causeIsAConnectionProblem)
         {
-            _network.close();
+            //ensure the IoSender and IoReceiver are closed
+            try
+            {
+                _network.close();
+            }
+            catch (Exception e)
+            {
+                //ignore
+            }
         }
         FailoverState state = getFailoverState();
         if (state == FailoverState.NOT_STARTED)
         {
-            if (connectionClosed)
+            if (causeIsAConnectionProblem)
             {
-                _logger.info("Exception caught therefore going to attempt failover: " + cause, cause);
+                _logger.info("Connection exception caught therefore going to attempt failover: " + cause, cause);
             }
             else
             {

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/common.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/common.xml?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/common.xml (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/common.xml Mon Nov 19 12:47:53 2012
@@ -93,6 +93,10 @@
   <property name="nexus.host"            value="repository.apache.org"/>
   <property name="nexus.upload.url"      value="https://${nexus.host}/service/local/staging/deploy/maven2"/>
 
+  <!-- properties for deplying snapshot artifacts -->
+  <property name="maven.snapshots.repo.id"     value="apache.snapshots.https"/>
+  <property name="maven.snapshots.repo.url"     value="https://${nexus.host}/content/repositories/snapshots"/>
+
   <!-- properties for downloading ivy, and then our dependencies -->
   <property name="ivy.jar.dir"         value="${project.root}/lib/ivy" />
   <property name="ivy.install.version" value="2.2.0" />

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java Mon Nov 19 12:47:53 2012
@@ -855,6 +855,7 @@ public class FieldTable
     public void addAll(FieldTable fieldTable)
     {
         initMapIfNecessary();
+        fieldTable.initMapIfNecessary();
         if (fieldTable._properties != null)
         {
             _encodedForm = null;

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java Mon Nov 19 12:47:53 2012
@@ -71,7 +71,8 @@ public class ServerDelegate extends Conn
 
         if (mechanism == null || mechanism.length() == 0)
         {
-            tuneAuthorizedConnection(conn);
+            conn.connectionClose(ConnectionCloseCode.CONNECTION_FORCED,
+                    "No Sasl mechanism was specified");
             return;
         }
 
@@ -82,7 +83,7 @@ public class ServerDelegate extends Conn
             if (ss == null)
             {
                 conn.connectionClose(ConnectionCloseCode.CONNECTION_FORCED,
-                     "null SASL mechanism: " + mechanism);
+                     "No SaslServer could be created for mechanism: " + mechanism);
                 return;
             }
             conn.setSaslServer(ss);

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java Mon Nov 19 12:47:53 2012
@@ -130,7 +130,6 @@ public class IoNetworkTransport implemen
 
     public void accept(NetworkTransportConfiguration config, ProtocolEngineFactory factory, SSLContext sslContext)
     {
-
         try
         {
             _acceptor = new AcceptingThread(config, factory, sslContext);
@@ -141,8 +140,6 @@ public class IoNetworkTransport implemen
         {
             throw new TransportException("Unable to start server socket", e);
         }
-
-
     }
 
     private class AcceptingThread extends Thread
@@ -155,8 +152,7 @@ public class IoNetworkTransport implemen
 
         private AcceptingThread(NetworkTransportConfiguration config,
                                 ProtocolEngineFactory factory,
-                                SSLContext sslContext)
-                throws IOException
+                                SSLContext sslContext) throws IOException
         {
             _config = config;
             _factory = factory;
@@ -172,15 +168,19 @@ public class IoNetworkTransport implemen
             {
                 SSLServerSocketFactory socketFactory = _sslContext.getServerSocketFactory();
                 _serverSocket = socketFactory.createServerSocket();
-                ((SSLServerSocket)_serverSocket).setNeedClientAuth(config.needClientAuth());
-                ((SSLServerSocket)_serverSocket).setWantClientAuth(config.wantClientAuth());
 
+                if(config.needClientAuth())
+                {
+                    ((SSLServerSocket)_serverSocket).setNeedClientAuth(true);
+                }
+                else if(config.wantClientAuth())
+                {
+                    ((SSLServerSocket)_serverSocket).setWantClientAuth(true);
+                }
             }
 
             _serverSocket.setReuseAddress(true);
             _serverSocket.bind(address);
-
-
         }
 
 
@@ -224,7 +224,6 @@ public class IoNetworkTransport implemen
                         socket.setSendBufferSize(sendBufferSize);
                         socket.setReceiveBufferSize(receiveBufferSize);
 
-
                         ProtocolEngine engine = _factory.newProtocolEngine();
 
                         NetworkConnection connection = new IoNetworkConnection(socket, engine, sendBufferSize, receiveBufferSize, TIMEOUT);

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java Mon Nov 19 12:47:53 2012
@@ -155,6 +155,7 @@ public class ConnectionTest extends Qpid
     {
         final Connection conn = new Connection();
         conn.setConnectionDelegate(new ClientDelegate(new ConnectionSettings()));
+
         conn.addConnectionListener(new ConnectionListener()
         {
             public void opened(Connection conn) {}
@@ -225,6 +226,12 @@ public class ConnectionTest extends Qpid
                 ssn.setSessionListener(ConnectionTest.this);
                 return ssn;
             }
+
+            @Override
+            public void connectionStartOk(Connection conn, ConnectionStartOk ok)
+            {
+                tuneAuthorizedConnection(conn);
+            }
         };
 
         try

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java:r1401294-1411033

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/module.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/module.xml?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/module.xml (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/module.xml Mon Nov 19 12:47:53 2012
@@ -277,9 +277,7 @@
     </jython>
   </target>
 
-  <target name="release-mvn" depends="pom" if="module.genpom" description="Install the artifacts into the local repository and prepare the release">
-    <antcall target="build"/>
-
+  <target name="release-mvn" depends="build,pom" if="module.genpom" description="Install the artifacts into the local repository and prepare the release artifacts">
     <artifact:pom id="module.pom" file="${build.scratch}/qpid-${module.name}.pom"/>
 
     <artifact:install file="${module.jar}" pomRefId="module.pom" settingsFile="${maven.settings.xml}">
@@ -293,6 +291,29 @@
     </artifact:deploy>
   </target>
 
+  <target name="deploy-snapshot" depends="build,pom" if="module.genpom" description="deploy a snapshot build to nexus">
+    <!-- In order to use this target you need to have predefined a username and password for the
+    server with id ${maven.snapshots.repo.id} in your m2 settings file, e.g ~/.m2/settings.xml -->
+    <artifact:pom id="module.pom" file="${build.scratch}/qpid-${module.name}.pom"/>
+
+    <fail message="The pom version must include -SNAPSHOT. Version found was: ${module.pom.version}">
+      <condition>
+        <not>
+          <contains substring="-SNAPSHOT" string="${module.pom.version}" />
+        </not>
+      </condition>
+    </fail>
+
+    <artifact:install file="${module.jar}" pomRefId="module.pom" settingsFile="${maven.settings.xml}">
+        <localRepository path="${maven.local.repo}"/>
+    </artifact:install>
+
+    <artifact:deploy file="${module.jar}" pomRefId="module.pom">
+      <localRepository path="${maven.local.repo}"/>
+      <remoteRepository id="${maven.snapshots.repo.id}" url="${maven.snapshots.repo.url}"/>
+    </artifact:deploy>
+  </target>
+
   <target name="precompile"/>
 
   <target name="compile" depends="prepare,precompile" description="compile sources">

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/ClientRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/ClientRegistry.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/ClientRegistry.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/ClientRegistry.java Mon Nov 19 12:47:53 2012
@@ -57,34 +57,54 @@ public class ClientRegistry
         return Collections.unmodifiableSet(_registeredClientNames);
     }
 
-    public int awaitClients(int numberOfClientsToAwait, long timeout)
+    /**
+     * @return the number of clients that are still absent.
+     */
+    public int awaitClients(final int numberOfClientsToAwait, final long idleTimeout)
     {
-        final long endTime = System.currentTimeMillis() + timeout;
+        long deadlineForNextRegistration = deadline(idleTimeout);
 
-        int numberOfClientsAbsent = numberOfClientsToAwait - _registeredClientNames.size();
-        long remainingTimeout = endTime - System.currentTimeMillis();
+        int numberOfClientsAbsent = numberAbsent(numberOfClientsToAwait);
 
-        while(numberOfClientsAbsent > 0 && remainingTimeout > 0)
+        while(numberOfClientsAbsent > 0 && System.currentTimeMillis() < deadlineForNextRegistration)
         {
             synchronized (_lock)
             {
                 try
                 {
-                    _lock.wait(remainingTimeout);
+                    _lock.wait(idleTimeout);
                 }
                 catch (InterruptedException e)
                 {
                    Thread.currentThread().interrupt();
+                   return numberOfClientsAbsent;
                 }
             }
 
-            numberOfClientsAbsent = numberOfClientsToAwait - _registeredClientNames.size();
-            remainingTimeout = endTime - System.currentTimeMillis();
+            int newNumberAbsent = numberAbsent(numberOfClientsToAwait);
+            if(newNumberAbsent < numberOfClientsAbsent)
+            {
+                // a registration was received since the last loop, so reset the timeout
+                deadlineForNextRegistration = deadline(idleTimeout);
+            }
+
+            numberOfClientsAbsent = newNumberAbsent;
         }
 
         return numberOfClientsAbsent < 0 ? 0 : numberOfClientsAbsent;
     }
 
+
+    private long deadline(final long idleTimeout)
+    {
+        return System.currentTimeMillis() + idleTimeout;
+    }
+
+    private int numberAbsent(int numberOfClientsToAwait)
+    {
+        return numberOfClientsToAwait - _registeredClientNames.size();
+    }
+
     private void notifyAllWaiters()
     {
         synchronized (_lock)

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ClientRegistryTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ClientRegistryTest.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ClientRegistryTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ClientRegistryTest.java Mon Nov 19 12:47:53 2012
@@ -29,6 +29,8 @@ public class ClientRegistryTest extends 
 {
     private static final String CLIENT1_REGISTERED_NAME = "CLIENT1_REGISTERED_NAME";
     private static final String CLIENT2_REGISTERED_NAME = "CLIENT2_REGISTERED_NAME";
+    private static final String CLIENT3_REGISTERED_NAME = "CLIENT3_REGISTERED_NAME";
+
     private static final int AWAIT_DELAY = 100;
 
     private ClientRegistry _clientRegistry = new ClientRegistry();
@@ -70,7 +72,7 @@ public class ClientRegistryTest extends 
         assertEquals(0, numberOfClientsAbsent);
     }
 
-    public void testAwaitTwoClientWhenClientRegistersWhilstWaiting()
+    public void testAwaitTwoClientsWhenClientRegistersWhilstWaiting()
     {
         _clientRegistry.registerClient(CLIENT1_REGISTERED_NAME);
         registerClientLater(CLIENT2_REGISTERED_NAME, 50);
@@ -79,6 +81,41 @@ public class ClientRegistryTest extends 
         assertEquals(0, numberOfClientsAbsent);
     }
 
+    public void testAwaitTimeoutForPromptRegistrations()
+    {
+        registerClientsLaterAndAssertResult("Clients registering every 100ms should be within 600ms timeout",
+                new int[] {300, 400, 500},
+                600,
+                0);
+    }
+
+    public void testAwaitTimeoutForWhenThirdRegistrationIsLate()
+    {
+        registerClientsLaterAndAssertResult("Third client registering tardily should exceed timeout",
+                new int[] {300, 400, 1500},
+                600,
+                1);
+    }
+
+    public void testAwaitTimeoutWhenSecondAndThirdRegistrationsAreLate()
+    {
+        registerClientsLaterAndAssertResult("Second and third clients registering tardily should exceed timeout",
+                new int[] {300, 1500, 1500},
+                600,
+                2);
+    }
+
+    private void registerClientsLaterAndAssertResult(String message, int[] registrationDelays, int timeout, int expectedNumberOfAbsentees)
+    {
+        registerClientLater(CLIENT1_REGISTERED_NAME, registrationDelays[0]);
+        registerClientLater(CLIENT2_REGISTERED_NAME, registrationDelays[1]);
+        registerClientLater(CLIENT3_REGISTERED_NAME, registrationDelays[2]);
+
+        int numberOfClientsAbsent = _clientRegistry.awaitClients(3, timeout);
+
+        assertEquals(message, expectedNumberOfAbsentees, numberOfClientsAbsent);
+    }
+
     private void registerClientLater(final String clientName, long delayInMillis)
     {
         doLater(new TimerTask()

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java Mon Nov 19 12:47:53 2012
@@ -25,11 +25,13 @@ import static org.apache.qpid.test.utils
 import static org.apache.qpid.test.utils.TestSSLConstants.TRUSTSTORE;
 import static org.apache.qpid.test.utils.TestSSLConstants.TRUSTSTORE_PASSWORD;
 
+import org.apache.commons.configuration.ConfigurationException;
 import org.apache.qpid.client.AMQConnectionURL;
 import org.apache.qpid.client.AMQTestConnection_0_10;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
 
 import javax.jms.Connection;
+import javax.jms.JMSException;
 import javax.jms.Session;
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
@@ -42,33 +44,24 @@ public class SSLTest extends QpidBrokerT
     @Override
     protected void setUp() throws Exception
     {
-        if(isJavaBroker())
-        {
-            setTestClientSystemProperty("profile.use_ssl", "true");
-            setConfigurationProperty("connector.ssl.enabled", "true");
-            setConfigurationProperty("connector.ssl.sslOnly", "true");
-            setConfigurationProperty("connector.ssl.wantClientAuth", "true");
-        }
-
-        // set the ssl system properties
-        setSystemProperty("javax.net.ssl.keyStore", KEYSTORE);
-        setSystemProperty("javax.net.ssl.keyStorePassword", KEYSTORE_PASSWORD);
-        setSystemProperty("javax.net.ssl.trustStore", TRUSTSTORE);
-        setSystemProperty("javax.net.ssl.trustStorePassword", TRUSTSTORE_PASSWORD);
         setSystemProperty("javax.net.debug", "ssl");
-        super.setUp();
+
+        setSslStoreSystemProperties();
+
+        //We dont call super.setUp, the tests start the broker after deciding
+        //whether to run and then configuring it appropriately
     }
 
     public void testCreateSSLConnectionUsingConnectionURLParams() throws Exception
     {
-        if (Boolean.getBoolean("profile.use_ssl"))
+        if (shouldPerformTest())
         {
-            // Clear the ssl system properties
-            setSystemProperty("javax.net.ssl.keyStore", null);
-            setSystemProperty("javax.net.ssl.keyStorePassword", null);
-            setSystemProperty("javax.net.ssl.trustStore", null);
-            setSystemProperty("javax.net.ssl.trustStorePassword", null);
+            clearSslStoreSystemProperties();
             
+            //Start the broker (NEEDing client certificate authentication)
+            configureJavaBrokerIfNecessary(true, true, true, false);
+            super.setUp();
+
             String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s" +
             "?ssl='true'&ssl_verify_hostname='true'" + 
             "&key_store='%s'&key_store_password='%s'" +
@@ -82,13 +75,16 @@ public class SSLTest extends QpidBrokerT
             assertNotNull("connection should be successful", con);
             Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE); 
             assertNotNull("create session should be successful", ssn);
-        }        
+        }
     }
 
     public void testCreateSSLConnectionUsingSystemProperties() throws Exception
     {
-        if (Boolean.getBoolean("profile.use_ssl"))
+        if (shouldPerformTest())
         {
+            //Start the broker (NEEDing client certificate authentication)
+            configureJavaBrokerIfNecessary(true, true, true, false);
+            super.setUp();
 
             String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s?ssl='true''";
 
@@ -103,8 +99,12 @@ public class SSLTest extends QpidBrokerT
 
     public void testMultipleCertsInSingleStore() throws Exception
     {
-        if (Boolean.getBoolean("profile.use_ssl"))
+        if (shouldPerformTest())
         {
+            //Start the broker (NEEDing client certificate authentication)
+            configureJavaBrokerIfNecessary(true, true, true, false);
+            super.setUp();
+
             String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" + 
             QpidBrokerTestCase.DEFAULT_SSL_PORT + 
             "?ssl='true'&ssl_cert_alias='" + CERT_ALIAS_APP1 + "''";
@@ -127,10 +127,14 @@ public class SSLTest extends QpidBrokerT
         }        
     }
     
-    public void testVerifyHostNameWithIncorrectHostname()
+    public void testVerifyHostNameWithIncorrectHostname() throws Exception
     {
-        if (Boolean.getBoolean("profile.use_ssl"))
+        if (shouldPerformTest())
         {
+            //Start the broker (WANTing client certificate authentication)
+            configureJavaBrokerIfNecessary(true, true, false, true);
+            super.setUp();
+
             String url = "amqp://guest:guest@test/?brokerlist='tcp://127.0.0.1:" + 
             QpidBrokerTestCase.DEFAULT_SSL_PORT + 
             "?ssl='true'&ssl_verify_hostname='true''";
@@ -142,19 +146,27 @@ public class SSLTest extends QpidBrokerT
             }
             catch (Exception e)
             {
-                ByteArrayOutputStream bout = new ByteArrayOutputStream();
-                e.printStackTrace(new PrintStream(bout));
-                String strace = bout.toString();
-                assertTrue("Correct exception not thrown",strace.contains("SSL hostname verification failed"));
+                verifyExceptionCausesContains(e, "SSL hostname verification failed");
             }
-            
         }        
     }
+
+    private void verifyExceptionCausesContains(Exception e, String expectedString)
+    {
+        ByteArrayOutputStream bout = new ByteArrayOutputStream();
+        e.printStackTrace(new PrintStream(bout));
+        String strace = bout.toString();
+        assertTrue("Correct exception not thrown", strace.contains(expectedString));
+    }
     
     public void testVerifyLocalHost() throws Exception
     {
-        if (Boolean.getBoolean("profile.use_ssl"))
+        if (shouldPerformTest())
         {
+            //Start the broker (WANTing client certificate authentication)
+            configureJavaBrokerIfNecessary(true, true, false, true);
+            super.setUp();
+
             String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" + 
             QpidBrokerTestCase.DEFAULT_SSL_PORT + 
             "?ssl='true'&ssl_verify_hostname='true''";
@@ -166,8 +178,12 @@ public class SSLTest extends QpidBrokerT
     
     public void testVerifyLocalHostLocalDomain() throws Exception
     {
-        if (Boolean.getBoolean("profile.use_ssl"))
+        if (shouldPerformTest())
         {
+            //Start the broker (WANTing client certificate authentication)
+            configureJavaBrokerIfNecessary(true, true, false, true);
+            super.setUp();
+
             String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost.localdomain:" + 
             QpidBrokerTestCase.DEFAULT_SSL_PORT + 
             "?ssl='true'&ssl_verify_hostname='true''";
@@ -179,13 +195,14 @@ public class SSLTest extends QpidBrokerT
 
     public void testCreateSSLConnectionUsingConnectionURLParamsTrustStoreOnly() throws Exception
     {
-        if (Boolean.getBoolean("profile.use_ssl"))
+        if (shouldPerformTest())
         {
-            // Clear the ssl system properties
-            setSystemProperty("javax.net.ssl.keyStore", null);
-            setSystemProperty("javax.net.ssl.keyStorePassword", null);
-            setSystemProperty("javax.net.ssl.trustStore", null);
-            setSystemProperty("javax.net.ssl.trustStorePassword", null);
+            clearSslStoreSystemProperties();
+
+            //Start the broker (WANTing client certificate authentication)
+            configureJavaBrokerIfNecessary(true, true, false, true);
+            super.setUp();
+
             
             String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s" +
             "?ssl='true'&ssl_verify_hostname='true'" + 
@@ -200,4 +217,120 @@ public class SSLTest extends QpidBrokerT
             assertNotNull("create session should be successful", ssn);
         }        
     }
+
+    /**
+     * Verifies that when the broker is configured to NEED client certificates,
+     * a client which doesn't supply one fails to connect.
+     */
+    public void testClientCertMissingWhilstNeeding() throws Exception
+    {
+        missingClientCertWhileNeedingOrWantingTestImpl(true, false, false);
+    }
+
+    /**
+     * Verifies that when the broker is configured to WANT client certificates,
+     * a client which doesn't supply one succeeds in connecting.
+     */
+    public void testClientCertMissingWhilstWanting() throws Exception
+    {
+        missingClientCertWhileNeedingOrWantingTestImpl(false, true, true);
+    }
+
+    /**
+     * Verifies that when the broker is configured to WANT and NEED client certificates
+     * that a client which doesn't supply one fails to connect.
+     */
+    public void testClientCertMissingWhilstWantingAndNeeding() throws Exception
+    {
+        missingClientCertWhileNeedingOrWantingTestImpl(true, true, false);
+    }
+
+    private void missingClientCertWhileNeedingOrWantingTestImpl(boolean needClientCerts,
+                            boolean wantClientCerts, boolean shouldSucceed) throws Exception
+    {
+        if (shouldPerformTest())
+        {
+            clearSslStoreSystemProperties();
+
+            //Start the broker
+            configureJavaBrokerIfNecessary(true, true, needClientCerts, wantClientCerts);
+            super.setUp();
+
+            String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s" +
+            "?ssl='true'&trust_store='%s'&trust_store_password='%s''";
+
+            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT,TRUSTSTORE,TRUSTSTORE_PASSWORD);
+            try
+            {
+                Connection con = getConnection(new AMQConnectionURL(url));
+                if(!shouldSucceed)
+                {
+                    fail("Connection succeeded, expected exception was not thrown");
+                }
+                else
+                {
+                    //Use the connection to verify it works
+                    con.createSession(true, Session.SESSION_TRANSACTED);
+                }
+            }
+            catch(JMSException e)
+            {
+                if(shouldSucceed)
+                {
+                    _logger.error("Caught unexpected exception",e);
+                    fail("Connection failed, unexpected exception thrown");
+                }
+                else
+                {
+                    //expected
+                    verifyExceptionCausesContains(e, "Caused by: javax.net.ssl.SSLException:");
+                }
+            }
+        }
+    }
+
+    private boolean shouldPerformTest()
+    {
+        // We run the SSL tests on all the Java broker profiles
+        if(isJavaBroker())
+        {
+            setTestClientSystemProperty(PROFILE_USE_SSL, "true");
+        }
+
+        return Boolean.getBoolean(PROFILE_USE_SSL);
+    }
+
+    private void configureJavaBrokerIfNecessary(boolean sslEnabled, boolean sslOnly, boolean needClientAuth, boolean wantClientAuth) throws ConfigurationException
+    {
+        if(isJavaBroker())
+        {
+            setConfigurationProperty("connector.ssl.enabled", String.valueOf(sslEnabled));
+            setConfigurationProperty("connector.ssl.sslOnly", String.valueOf(sslOnly));
+            setConfigurationProperty("connector.ssl.needClientAuth", String.valueOf(needClientAuth));
+            setConfigurationProperty("connector.ssl.wantClientAuth", String.valueOf(wantClientAuth));
+
+            if(needClientAuth || wantClientAuth)
+            {
+                //TODO: make a broker trust store?
+                setConfigurationProperty("connector.ssl.trustStorePath", TRUSTSTORE);
+                setConfigurationProperty("connector.ssl.trustStorePassword", TRUSTSTORE_PASSWORD);
+            }
+        }
+    }
+
+    private void setSslStoreSystemProperties()
+    {
+        setSystemProperty("javax.net.ssl.keyStore", KEYSTORE);
+        setSystemProperty("javax.net.ssl.keyStorePassword", KEYSTORE_PASSWORD);
+        setSystemProperty("javax.net.ssl.trustStore", TRUSTSTORE);
+        setSystemProperty("javax.net.ssl.trustStorePassword", TRUSTSTORE_PASSWORD);
+    }
+
+    private void clearSslStoreSystemProperties()
+    {
+        setSystemProperty("javax.net.ssl.keyStore", null);
+        setSystemProperty("javax.net.ssl.keyStorePassword", null);
+        setSystemProperty("javax.net.ssl.trustStore", null);
+        setSystemProperty("javax.net.ssl.trustStorePassword", null);
+    }
 }

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java:r1401294-1411033

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java Mon Nov 19 12:47:53 2012
@@ -941,7 +941,65 @@ public class AddressBasedDestinationTest
                     e.getMessage());
         }
     }
-    
+
+    public void testDurableSubscription() throws Exception
+    {
+        Session session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Topic topic = session.createTopic("ADDR:amq.topic/" + getTestQueueName());
+        MessageProducer publisher = session.createProducer(topic);
+        MessageConsumer subscriber = session.createDurableSubscriber(topic, getTestQueueName());
+
+        TextMessage messageToSend = session.createTextMessage("Test0");
+        publisher.send(messageToSend);
+        ((AMQSession<?,?>)session).sync();
+
+        Message receivedMessage = subscriber.receive(1000);
+        assertNotNull("Message has not been received", receivedMessage);
+        assertEquals("Unexpected message", messageToSend.getText(), ((TextMessage)receivedMessage).getText());
+
+        subscriber.close();
+
+        messageToSend = session.createTextMessage("Test1");
+        publisher.send(messageToSend);
+        ((AMQSession<?,?>)session).sync();
+
+        subscriber = session.createDurableSubscriber(topic, getTestQueueName());
+        receivedMessage = subscriber.receive(1000);
+        assertNotNull("Message has not been received", receivedMessage);
+        assertEquals("Unexpected message", messageToSend.getText(), ((TextMessage)receivedMessage).getText());
+    }
+
+    public void testDurableSubscriptionnWithSelector() throws Exception
+    {
+        Session session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Topic topic = session.createTopic("ADDR:amq.topic/" + getTestQueueName());
+        MessageProducer publisher = session.createProducer(topic);
+        MessageConsumer subscriber = session.createDurableSubscriber(topic, getTestQueueName(), "id=1", false);
+
+        TextMessage messageToSend = session.createTextMessage("Test0");
+        messageToSend.setIntProperty("id", 1);
+        publisher.send(messageToSend);
+        ((AMQSession<?,?>)session).sync();
+
+        Message receivedMessage = subscriber.receive(1000);
+        assertNotNull("Message has not been received", receivedMessage);
+        assertEquals("Unexpected message", messageToSend.getText(), ((TextMessage)receivedMessage).getText());
+        assertEquals("Unexpected id", 1, receivedMessage.getIntProperty("id"));
+
+        subscriber.close();
+
+        messageToSend = session.createTextMessage("Test1");
+        messageToSend.setIntProperty("id", 1);
+        publisher.send(messageToSend);
+        ((AMQSession<?,?>)session).sync();
+
+        subscriber = session.createDurableSubscriber(topic, getTestQueueName(), "id=1", false);
+        receivedMessage = subscriber.receive(1000);
+        assertNotNull("Message has not been received", receivedMessage);
+        assertEquals("Unexpected message", messageToSend.getText(), ((TextMessage)receivedMessage).getText());
+        assertEquals("Unexpected id", 1, receivedMessage.getIntProperty("id"));
+    }
+
     private void createDurableSubscriber(Context ctx,Session ssn,String destName,Topic topic, String producerAddr) throws Exception
     {        
         MessageConsumer cons = ssn.createDurableSubscriber(topic, destName);

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java Mon Nov 19 12:47:53 2012
@@ -129,6 +129,7 @@ public class QpidBrokerTestCase extends 
     private static final String BROKER_PERSITENT = "broker.persistent";
     public static final String BROKER_PROTOCOL_EXCLUDES = "broker.protocol.excludes";
     public static final String BROKER_PROTOCOL_INCLUDES = "broker.protocol.includes";
+    public static final String PROFILE_USE_SSL = "profile.use_ssl";
 
     // values
     protected static final String JAVA = "java";
@@ -1066,7 +1067,7 @@ public class QpidBrokerTestCase extends 
         _logger.info("get ConnectionFactory");
         if (_connectionFactory == null)
         {
-            if (Boolean.getBoolean("profile.use_ssl"))
+            if (Boolean.getBoolean(PROFILE_USE_SSL))
             {
                 _connectionFactory = getConnectionFactory("default.ssl");
             }
@@ -1356,11 +1357,6 @@ public class QpidBrokerTestCase extends 
         _messageSize = byteSize;
     }
 
-    public ConnectionURL getConnectionURL() throws NamingException
-    {
-        return getConnectionFactory().getConnectionURL();
-    }
-
     public BrokerDetails getBroker()
     {
         try

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles:r1401294-1411033

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/CPPExcludes
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/CPPExcludes?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/CPPExcludes (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/CPPExcludes Mon Nov 19 12:47:53 2012
@@ -178,3 +178,6 @@ org.apache.qpid.systest.rest.acl.*
 
 // Exclude failover tests requiring virtual host functionality
 org.apache.qpid.client.failover.MultipleBrokersFailoverTest#*
+
+// Uses Java broker specific configuration
+org.apache.qpid.client.ssl.SSLTest#testClientCertMissingWhilstWanting

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/CPPExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/CPPExcludes:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/Excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/Excludes:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/JavaBDBExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaBDBExcludes:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/JavaExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaExcludes:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/JavaPre010Excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/JavaTransientExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaTransientExcludes:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/XAExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/XAExcludes:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/cpp.async.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/cpp.cluster.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.cluster.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/cpp.noprefetch.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/cpp.ssl.excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/cpp.ssl.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.ssl.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/cpp.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-bdb.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-bdb.0-9-1.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-dby.0-9-1.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-mms.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms.0-9-1.testprofile:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/log4j-test.xml
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/log4j-test.xml:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/test-provider.properties
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/test-provider.properties:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/test_resources/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/test_resources:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/testprofile.defaults
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/testprofile.defaults:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/packaging/windows/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/packaging/windows:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/packaging/windows/installer.proj
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/packaging/windows/installer.proj:r1401294-1411033

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/packaging/windows/qpidc.wxs
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/packaging/windows/qpidc.wxs?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/packaging/windows/qpidc.wxs (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/packaging/windows/qpidc.wxs Mon Nov 19 12:47:53 2012
@@ -105,8 +105,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>
 

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/python/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/python:r1401294-1411033

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/python/examples/api/spout
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/python/examples/api/spout:r1401294-1411033

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/client.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/client.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/client.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/client.py Mon Nov 19 12:47:53 2012
@@ -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:

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/concurrency.py
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/python/qpid/concurrency.py:r1401294-1411033

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/connection08.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/connection08.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/connection08.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/connection08.py Mon Nov 19 12:47:53 2012
@@ -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/java-broker-config-qpid-4390/qpid/python/qpid/delegates.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/delegates.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/delegates.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/delegates.py Mon Nov 19 12:47:53 2012
@@ -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/java-broker-config-qpid-4390/qpid/python/qpid/messaging/driver.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/messaging/driver.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/messaging/driver.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/messaging/driver.py Mon Nov 19 12:47:53 2012
@@ -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/java-broker-config-qpid-4390/qpid/python/qpid/testlib.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/testlib.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/testlib.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/testlib.py Mon Nov 19 12:47:53 2012
@@ -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/java-broker-config-qpid-4390/qpid/python/qpid/tests/__init__.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/tests/__init__.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/tests/__init__.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/tests/__init__.py Mon Nov 19 12:47:53 2012
@@ -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/java-broker-config-qpid-4390/qpid/python/qpid/util.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/util.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/util.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/python/qpid/util.py Mon Nov 19 12:47:53 2012
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-import os, socket, time, textwrap, re
+import os, socket, time, textwrap, re, sys
 
 try:
   from ssl import wrap_socket as ssl
@@ -42,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/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_8/basic.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_8/basic.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_8/basic.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_8/basic.py Mon Nov 19 12:47:53 2012
@@ -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/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_9/__init__.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_9/__init__.py?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_9/__init__.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_9/__init__.py Mon Nov 19 12:47:53 2012
@@ -19,4 +19,4 @@
 # under the License.
 #
 
-import query, queue
+import query, queue, messageheader

Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py:r1401294-1411033

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/tools/src/py/qpid-config
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/tools/src/py/qpid-config?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/tools/src/py/qpid-config (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/tools/src/py/qpid-config Mon Nov 19 12:47:53 2012
@@ -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:

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/wcf/samples/Channel/HelloWorld/HelloWorld.cs
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/wcf/samples/Channel/HelloWorld/HelloWorld.cs?rev=1411155&r1=1411154&r2=1411155&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/wcf/samples/Channel/HelloWorld/HelloWorld.cs (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/wcf/samples/Channel/HelloWorld/HelloWorld.cs Mon Nov 19 12:47:53 2012
@@ -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