You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2011/10/28 17:52:18 UTC

svn commit: r1190406 [1/5] - in /qpid/branches/qpid-3346/qpid: ./ bin/ cpp/design_docs/ cpp/docs/api/ cpp/docs/man/ cpp/examples/old_api/tradedemo/ cpp/include/qmf/engine/ cpp/src/ cpp/src/posix/ cpp/src/qmf/engine/ cpp/src/qpid/ cpp/src/qpid/acl/ cpp/...

Author: kgiusti
Date: Fri Oct 28 15:52:13 2011
New Revision: 1190406

URL: http://svn.apache.org/viewvc?rev=1190406&view=rev
Log:
QPID-3346: resync this development branch with latest trunk

Added:
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/unordered_map.h
      - copied unchanged from r1190375, qpid/trunk/qpid/cpp/src/qpid/sys/unordered_map.h
    qpid/branches/qpid-3346/qpid/cpp/src/tests/BrokerOptions.cpp
      - copied unchanged from r1190375, qpid/trunk/qpid/cpp/src/tests/BrokerOptions.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/tests/sasl_no_dir
      - copied unchanged from r1190375, qpid/trunk/qpid/cpp/src/tests/sasl_no_dir
    qpid/branches/qpid-3346/qpid/cpp/src/windows/SCM.cpp
      - copied unchanged from r1190375, qpid/trunk/qpid/cpp/src/windows/SCM.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/windows/SCM.h
      - copied unchanged from r1190375, qpid/trunk/qpid/cpp/src/windows/SCM.h
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/AddressBasedFailoverBehaviourTest.java
      - copied unchanged from r1190375, qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/AddressBasedFailoverBehaviourTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TemporaryTopicTest.java
      - copied unchanged from r1190375, qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TemporaryTopicTest.java
Removed:
    qpid/branches/qpid-3346/qpid/java/build.overrides
Modified:
    qpid/branches/qpid-3346/qpid/   (props changed)
    qpid/branches/qpid-3346/qpid/bin/release.sh
    qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-design.txt
    qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-plan.txt
    qpid/branches/qpid-3346/qpid/cpp/docs/api/   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/docs/man/qpidd.1
    qpid/branches/qpid-3346/qpid/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/include/qmf/engine/Agent.h   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/include/qmf/engine/Console.h   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/CMakeLists.txt   (contents, props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/Makefile.am
    qpid/branches/qpid-3346/qpid/cpp/src/posix/QpiddBroker.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qmf.mk
    qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/Agent.cpp   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/RefCountedBuffer.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/Sasl.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/SaslFactory.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/acl/AclPlugin.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/ConnectionHandler.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Message.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Message.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Queue.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/SaslAuthenticator.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/SemanticState.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/SemanticState.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/SessionState.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/client/ConnectionHandler.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/client/windows/SaslFactory.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/cluster/Cluster.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/cluster/Cluster.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/cluster/UpdateClient.cpp   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/cluster/UpdateClient.h   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/framing/Uuid.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/management/ManagementAgent.cpp   (contents, props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/management/ManagementAgent.h   (props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/Socket.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/SslPlugin.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/alloca.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/ssl/SslIo.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/ssl/SslIo.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/ssl/SslSocket.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/sys/ssl/SslSocket.h
    qpid/branches/qpid-3346/qpid/cpp/src/qpid/types/Uuid.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpidd.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/qpidd.h
    qpid/branches/qpid-3346/qpid/cpp/src/tests/Makefile.am
    qpid/branches/qpid-3346/qpid/cpp/src/tests/QueueTest.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/tests/acl.py
    qpid/branches/qpid-3346/qpid/cpp/src/tests/cluster_tests.py   (contents, props changed)
    qpid/branches/qpid-3346/qpid/cpp/src/tests/qpid-perftest.cpp
    qpid/branches/qpid-3346/qpid/cpp/src/tests/sasl.mk
    qpid/branches/qpid-3346/qpid/cpp/src/tests/ssl_test
    qpid/branches/qpid-3346/qpid/cpp/src/windows/QpiddBroker.cpp
    qpid/branches/qpid-3346/qpid/doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml
    qpid/branches/qpid-3346/qpid/doc/book/src/Programming-In-Apache-Qpid.xml
    qpid/branches/qpid-3346/qpid/doc/book/src/Qpid-Java-FAQ.xml
    qpid/branches/qpid-3346/qpid/doc/book/src/System-Properties.xml
    qpid/branches/qpid-3346/qpid/extras/qmf/src/py/qmf/console.py
    qpid/branches/qpid-3346/qpid/java/   (props changed)
    qpid/branches/qpid-3346/qpid/java/broker/   (props changed)
    qpid/branches/qpid-3346/qpid/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/AppInfo.java
    qpid/branches/qpid-3346/qpid/java/broker-plugins/experimental/info/src/test/java/org/apache/qpid/info/systest/InfoPluginTest.java
    qpid/branches/qpid-3346/qpid/java/broker/bin/   (props changed)
    qpid/branches/qpid-3346/qpid/java/broker/bin/qpid-server.bat
    qpid/branches/qpid-3346/qpid/java/broker/etc/config.xml
    qpid/branches/qpid-3346/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java
    qpid/branches/qpid-3346/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java
    qpid/branches/qpid-3346/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
    qpid/branches/qpid-3346/qpid/java/broker/src/main/java/org/apache/qpid/server/management/   (props changed)
    qpid/branches/qpid-3346/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/   (props changed)
    qpid/branches/qpid-3346/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/   (props changed)
    qpid/branches/qpid-3346/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
    qpid/branches/qpid-3346/qpid/java/build.xml
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTemporaryQueue.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTemporaryTopic.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/TemporaryDestination.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java
    qpid/branches/qpid-3346/qpid/java/client/src/main/java/org/apache/qpid/filter/JMSSelectorFilter.java
    qpid/branches/qpid-3346/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
    qpid/branches/qpid-3346/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ConfigurationManagement.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/eclipse-plugin/src/   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc   (props changed)
    qpid/branches/qpid-3346/qpid/java/systests/etc/config-systests-firewall-2.xml
    qpid/branches/qpid-3346/qpid/java/systests/etc/config-systests-firewall-3.xml
    qpid/branches/qpid-3346/qpid/java/systests/etc/config-systests-settings.xml
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/client/ResetMessageListenerTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/MultipleTransactedBatchProducerTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/test/client/CancelTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/temporaryqueue/TemporaryQueueTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java
    qpid/branches/qpid-3346/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/CPPExcludes   (contents, props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/Excludes   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/JavaBDBExcludes   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/JavaExcludes   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/JavaPre010Excludes   (contents, props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/JavaTransientExcludes   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/XAExcludes   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/cpp.async.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/cpp.cluster.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/cpp.noprefetch.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/cpp.ssl.excludes   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/cpp.ssl.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/cpp.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/java-bdb.0-9-1.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/java-dby.0-9-1.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/java-mms.0-9-1.testprofile   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/log4j-test.xml   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/test-provider.properties   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/test_resources/   (props changed)
    qpid/branches/qpid-3346/qpid/java/test-profiles/testprofile.defaults   (props changed)
    qpid/branches/qpid-3346/qpid/packaging/windows/   (props changed)
    qpid/branches/qpid-3346/qpid/python/   (props changed)
    qpid/branches/qpid-3346/qpid/python/examples/api/spout   (props changed)
    qpid/branches/qpid-3346/qpid/python/qpid/concurrency.py   (props changed)
    qpid/branches/qpid-3346/qpid/specs/management-schema.xml
    qpid/branches/qpid-3346/qpid/tests/src/py/qpid_tests/broker_0_10/management.py
    qpid/branches/qpid-3346/qpid/tests/src/py/qpid_tests/broker_0_10/message.py
    qpid/branches/qpid-3346/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py   (props changed)
    qpid/branches/qpid-3346/qpid/tools/src/py/qpid-config

Propchange: qpid/branches/qpid-3346/qpid/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:52:13 2011
@@ -3,4 +3,4 @@
 /qpid/branches/0.6-release-windows-installer/qpid:926803,927233
 /qpid/branches/java-network-refactor/qpid:805429-825319
 /qpid/branches/qpid-2935/qpid:1061302-1072333
-/qpid/trunk/qpid:1144319-1179750
+/qpid/trunk/qpid:1144319-1190375

Modified: qpid/branches/qpid-3346/qpid/bin/release.sh
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/bin/release.sh?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/bin/release.sh (original)
+++ qpid/branches/qpid-3346/qpid/bin/release.sh Fri Oct 28 15:52:13 2011
@@ -36,9 +36,7 @@ usage()
     echo "--all   |-a : Generate all artefacts"
     echo "--source|-e : Generate the source artefact"
     echo "--cpp   |-c : Generate the CPP artefacts"
-    echo "--dotnet|-d : Generate the dotnet artefacts"
     echo "--java  |-j : Generate the java artefacts"
-    echo "--ruby  |-r : Generate the ruby artefacts"
     echo "--python|-p : Generate the python artefacts"
     echo "--wcf   |-w : Generate the WCF artefacts"
     echo "--tools |-t : Generate the tools artefacts"
@@ -49,6 +47,19 @@ usage()
     echo
 }
 
+all_artefacts()
+{
+   echo ALL_ARTEFACTS
+
+   CPP="CPP"
+   JAVA="JAVA"
+   PYTHON="PYTHON"
+   WCF="WCF"
+   TOOLS="TOOLS"
+   QMF="QMF"
+   SOURCE="SOURCE"
+}
+
 REPO="SVN"
 for arg in $* ; do 
  case $arg in
@@ -75,26 +86,14 @@ for arg in $* ; do 
    SIGN="SIGN"
  ;;
  --all|-a)
-   CPP="CPP"
-   JAVA="JAVA"
-   PYTHON="PYTHON"
-   WCF="WCF"
-   TOOLS="TOOLS"
-   QMF="QMF"
-   SOURCE="SOURCE"
+   all_artefacts
  ;;
  --cpp|-c)
    CPP="CPP"
  ;;
- --dotnet|-d)
-   DOTNET="DOTNET"
- ;;
  --java|-j)
    JAVA="JAVA"
  ;;
- --ruby|-r)
-   RUBY="RUBY"
- ;;
  --python|-p)
    PYTHON="PYTHON"
  ;;
@@ -147,16 +146,9 @@ echo REV:$REV
 echo VER:$VER
 
 # If nothing is specified then do it all
-if [ -z "${CLEAN}${PREPARE}${CPP}${DOTNET}${JAVA}${RUBY}${PYTHON}${WCF}${SOURCE}${SIGN}${UPLOAD}" ] ; then
+if [ -z "${CLEAN}${PREPARE}${CPP}${JAVA}${PYTHON}${QMF}${TOOLS}${WCF}${SOURCE}${SIGN}${UPLOAD}" ] ; then
    PREPARE="PREPARE"
-   CPP="CPP"
-   DOTNET="DOTNET"
-   JAVA="JAVA"
-   RUBY="RUBY"
-   PYTHON="PYTHON"
-   WCF="WCF"
-   SOURCE="SOURCE"
-
+   all_artefacts
    SIGN="SIGN"
 fi
 
@@ -192,10 +184,6 @@ if [ "SOURCE" == "$SOURCE" ] ; then
   tar -czf artifacts/qpid-${VER}.tar.gz qpid-${VER}
 fi
 
-if [ "RUBY" == "$RUBY" ] ; then
-  tar -czf artifacts/qpid-ruby-${VER}.tar.gz qpid-${VER}/ruby qpid-${VER}/specs
-fi
-
 if [ "PYTHON" == "$PYTHON" ] ; then
   tar -czf artifacts/qpid-python-${VER}.tar.gz qpid-${VER}/python qpid-${VER}/specs
 fi
@@ -215,14 +203,20 @@ if [ "CPP" == "$CPP" ] ; then
 fi
 
 if [ "JAVA" == "$JAVA" ] ; then
+  # generate the java 'release' archive seperately to ensure it doesnt have any optional feature dependencies in it
   pushd qpid-${VER}/java
-  ant build release release-bin release-mvn -Dsvnversion.output=${REV} -Dmaven.snapshot=false
+  ant build release -Dsvnversion.output=${REV}
   popd
 
   cp qpid-${VER}/java/release/*.tar.gz  artifacts/qpid-java-${VER}.tar.gz
+
+  # now generate the binary packages, with the glue for optional features
+  pushd qpid-${VER}/java
+  ant build release-bin release-mvn -Dsvnversion.output=${REV} -Dmaven.snapshot=false -Dmodules.opt=bdbstore -Ddownload-bdb=true
+  popd
+
   cp qpid-${VER}/java/broker/release/*.tar.gz artifacts/qpid-java-broker-${VER}.tar.gz
   cp qpid-${VER}/java/client/release/*.tar.gz artifacts/qpid-java-client-${VER}.tar.gz
-  #cp qpid-${VER}/java/client/example/release/*.tar.gz 
   cp qpid-${VER}/java/management/eclipse-plugin/release/*.tar.gz qpid-${VER}/java/management/eclipse-plugin/release/*.zip artifacts/
 
   # copy the Maven artifacts
@@ -230,23 +224,6 @@ if [ "JAVA" == "$JAVA" ] ; then
   cp -a qpid-${VER}/java/common/release/maven artifacts/
 fi
 
-if [ "DOTNET" == "$DOTNET" ] ; then
-  pushd qpid-${VER}/dotnet
-  cd Qpid.Common
-  ant
-  cd ..
-  ./build-nant-release mono-2.0
-
-  cd client-010/gentool
-  ant
-  cd ..
-  nant -t:mono-2.0 release-pkg
-  popd
-
-  cp qpid-${VER}/dotnet/bin/mono-2.0/release/*.zip artifacts/qpid-dotnet-0-8-${VER}.zip
-  cp qpid-${VER}/dotnet/client-010/bin/mono-2.0/debug/*.zip artifacts/qpid-dotnet-0-10-${VER}.zip
-fi
-
 if [ "TOOLS" = "$TOOLS" ] ; then
     pushd qpid-${VER}/tools
 

Modified: qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-design.txt
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-design.txt?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-design.txt (original)
+++ qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-design.txt Fri Oct 28 15:52:13 2011
@@ -17,7 +17,6 @@
 # under the License.
 
 * A new design for Qpid clustering.
-
 ** Issues with current design.
 
 The cluster is based on virtual synchrony: each broker multicasts
@@ -84,19 +83,21 @@ context.
 
 ** A new cluster design.
 
-Clearly defined interface between broker code and cluster plug-in.
-
-Replicate queue events rather than client data.
-- Broker behavior only needs to match per-queue.
-- Smaller amount of code (queue implementation) that must behave predictably.
-- Events only need be serialized per-queue, allows concurrency between queues
-
-Use a moving queue ownership protocol to agree order of dequeues.
-No longer relies on identical state and lock-step behavior to cause
-identical dequeues on each broker.
+1. Clearly defined interface between broker code and cluster plug-in.
 
-Each queue has an associated thread-context. Events for a queue are executed
-in that queues context, in parallel with events for other queues.
+2. Replicate queue events rather than client data.
+ - Only requires consistent enqueue order.
+ - Events only need be serialized per-queue, allows concurrency between queues
+ - Allows for replicated and non-replicated queues.
+
+3. Use a lock protocol to agree order of dequeues: only the broker
+   holding the lock can acqiure & dequeue.  No longer relies on
+   identical state and lock-step behavior to cause identical dequeues
+   on each broker.
+
+4. Use multiple CPG groups to process different queues in
+   parallel. Use a fixed set of groups and hash queue names to choose
+   the group for each queue.
 
 *** Requirements
 
@@ -149,7 +150,7 @@ a release-queue event, allowing another 
 ownership.
 
 *** Asynchronous completion of accept
-### HERE
+
 In acknowledged mode a message is not forgotten until it is accepted,
 to allow for requeue on rejection or crash. The accept should not be
 completed till the message has been forgotten.
@@ -162,19 +163,32 @@ On receiving an accept the broker:
 NOTE: The message store does not currently implement asynchronous
 completions of accept, this is a bug.
 
+*** Multiple CPG groups.
+
+The old cluster was bottlenecked by processing everything in a single
+CPG deliver thread.
+
+The new cluster uses a set of CPG groups, one per core. Queue names
+are hashed to give group indexes, so statistically queues are likely
+to be spread over the set of groups.
+
+Operations on a given queue always use the same group, so we have
+order within each queue, but operations on different queues can use
+different groups giving greater throughput sending to CPG and multiple
+handler threads to process CPG messages.
+
 ** Inconsistent errors.
 
-The new design eliminates most sources of inconsistent errors
-(connections, sessions, security, management etc.) The only points
-where inconsistent errors can occur are at enqueue and dequeue (most
-likely store-related errors.)
-
-The new design can use the exisiting error-handling protocol with one
-major improvement: since brokers are no longer required to maintain
-identical state they do not have to stall processing while an error is
-being resolved.
+An inconsistent error means that after multicasting an enqueue, accept
+or dequeue, some brokers succeed in processing it and others fail.
 
-#TODO: The only source of dequeue errors is probably an unrecoverable journal failure.
+The new design eliminates most sources of inconsistent errors in the
+old broker: connections, sessions, security, management etc. Only
+store journal errors remain.
+
+The new inconsistent error protocol is similar to the old one with one
+major improvement: brokers do not have to stall processing while an
+error is being resolved.
 
 ** Updating new members
 
@@ -193,60 +207,44 @@ catch up (which is not guaranteed to hap
 With the new cluster design only exchanges, queues, bindings and
 messages need to be replicated.
 
-Update of wiring (exchanges, queues, bindings) is the same as current
-design.
-
-Update of messages is different:
-- per-queue rather than per-broker, separate queues can be updated in parallel.
-- updates queues in reverse order to eliminate unbounded catch-up
-- does not require updater & updatee to stall during update.
-
-Replication events, multicast to cluster:
-- enqueue(q,m): message m pushed on back of queue q .
-- acquire(q,m): mark m acquired
-- dequeue(q,m): forget m.
-Messages sent on update connection:
-- update_front(q,m): during update, receiver pushes m to *front* of q
-- update_done(q): during update, update of q is complete.
-
-Updater:
-- when updatee joins set iterator i = q.end()
-- while i != q.begin(): --i; send update_front(q,*i) to updatee
-- send update_done(q) to updatee
-
-Updatee:
-- q initially in locked state, can't dequeue locally.
-- start processing replication events for q immediately (enqueue, dequeue, acquire etc.)
-- receive update_front(q,m): q.push_front(m)
-- receive update_done(q): q can be unlocked for local dequeing.
-
-Benefits:
-- Stall only for wiring update: updater & updatee can process multicast messages while messages are updated.
-- No unbounded catch-up: update consists of at most N update_front() messages where N=q.size() at start of update.
-- During update consumers actually help by removing messages before they need to be updated.
-- Needs no separate "work to do" queue, only the broker queues themselves.
-
-# TODO how can we recover from updater crashing before update complete?
-# Clear queues that are not updated & send request for udpates on those queues?
-
-# TODO updatee may receive a dequeue for a message it has not yet seen, needs
-# to hold on to that so it can drop the message when it is seen.
-# Similar problem exists for wiring?
-
-** Cluster API
-
-The new cluster API is similar to the MessageStore interface.
-(Initially I thought it would be an extension of the MessageStore interface,
-but as the design develops it seems better to make it a separate interface.)
+We update individual objects (queues and exchanges) independently.
+- create queues first, then update all queues and exchanges in parallel.
+- multiple updater threads, per queue/exchange.
+
+Queue updater:
+- marks the queue position at the sync point
+- sends messages starting from the sync point working towards the head of the queue.
+- send "done" message.
+
+Queue updatee:
+- enqueues received from CPG: add to back of queue as normal.
+- dequeues received from CPG: apply if found, else save to check at end of update.
+- messages from updater: add to the *front* of the queue.
+- update complete: apply any saved dequeues.
+
+Exchange updater:
+- updater: send snapshot of exchange as it was at the sync point.
+
+Exchange updatee:
+- queue exchange operations after the sync point.
+- when snapshot is received: apply saved operations.
+
+Note:
+- Updater is active throughout, no stalling.
+- Consuming clients actually reduce the size of the update.
+- Updatee stalls clients until the update completes.
+  (Note: May be possible to avoid updatee stall as well, needs thought)
+
+** Internal cluster interface
+
+The new cluster interface is similar to the MessageStore interface, but
+provides more detail (message positions) and some additional call
+points (e.g. acquire)
 
 The cluster interface captures these events:
 - wiring changes: queue/exchange declare/bind
 - message enqueued/acquired/released/rejected/dequeued.
-
-The cluster will require some extensions to the Queue:
-- Queues can be "locked", locked queues are ignored by IO-driven output.
-- Cluster must be able to apply queue events from the cluster to a queue.
-  These appear to fit into existing queue operations.
+- transactional events.
 
 ** Maintainability
 
@@ -273,106 +271,48 @@ A number of specific ways the code will 
 
 ** Performance
 
-The only way to verify the relative performance of the new design is
-to prototype & profile. The following points suggest the new design
-may scale/perform better:
-
-Some work moved from virtual synchrony thread to connection threads:
-- All connection/session logic moves to connection thread.
-- Exchange routing logic moves to connection thread.
-- On local broker dequeueing is done in connection thread
-- Local broker dequeue is IO driven as for a standalone broker.
-
-For queues with all consumers on a single node dequeue is all
-IO-driven in connection thread. Pay for time-sharing only if queue has
-consumers on multiple brokers.
-
-Doing work for different queues in parallel scales on multi-core boxes when
-there are multiple queues.
-
-One difference works against performance, thre is an extra
-encode/decode. The old design multicasts raw client data and decodes
-it in the virtual synchrony thread. The new design would decode
-messages in the connection thread, re-encode them for multicast, and
-decode (on non-local brokers) in the virtual synchrony thread. There
-is extra work here, but only in the *connection* thread: on a
-multi-core machine this happens in parallel for every connection, so
-it probably is not a bottleneck. There may be scope to optimize
-decode/re-encode by re-using some of the original encoded data, this
-could also benefit the stand-alone broker.
-
-** Asynchronous queue replication
-
-The existing "asynchronous queue replication" feature maintains a
-passive backup passive backup of queues on a remote broker over a TCP
-connection.
-
-The new cluster replication protocol could be re-used to implement
-asynchronous queue replication: its just a special case where the
-active broker is always the queue owner and the enqueue/dequeue
-messages are sent over a TCP connection rather than multicast.
-
-The new update update mechanism could also work with 'asynchronous
-queue replication', allowing such replication (over a TCP connection
-on a WAN say) to be initiated after the queue had already been created
-and been in use (one of the key missing features).
-
-** Increasing Concurrency and load sharing
-
-The current cluster is bottlenecked by processing everything in the
-CPG deliver thread. By removing the need for identical operation on
-each broker, we open up the possiblility of greater concurrency.
-
-Handling multicast enqueue, acquire, accpet, release etc: concurrency
-per queue.  Operatons on different queues can be done in different
-threads.
-
-The new design does not force each broker to do all the work in the
-CPG thread so spreading load across cluster members should give some
-scale-up.
-
-** Misc outstanding issues & notes
-
-Replicating wiring
-- Need async completion of wiring commands?
-- qpid.sequence_counter: need extra work to support in new design, do we care?
-
-Cluster+persistence:
-- finish async completion: dequeue completion for store & cluster
-- cluster restart from store: clean stores *not* identical, pick 1, all others update.
-- need to generate cluster ids for messages recovered from store.
-
-Live updates: we don't need to stall brokers during an update!
-- update on queue-by-queue basis.
-- updatee locks queues during update, no dequeue.
-- update in reverse: don't update messages dequeued during update.
-- updatee adds update messages at front (as normal), replicated messages at back.
-- updater starts from back, sends "update done" when it hits front of queue.
-
-Flow control: need to throttle multicasting
-1. bound the number of outstanding multicasts.
-2. ensure the entire cluster keeps up, no unbounded "lag"
-The existing design uses read-credit to solve 1., and does not solve 2.
-New design should stop reading on all connections while flow control
-condition exists?
-
-Can federation also be unified, at least in configuration?
-
-Consider queues (and exchanges?) as having "reliability" attributes:
-- persistent: is the message stored on disk.
-- backed-up (to another broker): active/passive async replication.
-- replicated (to a cluster): active/active multicast replication to cluster.
-- federated: federation link to a queue/exchange on another broker.
-
-"Reliability" seems right for the first 3 but not for federation, is
-there a better term?
-
-Clustering and scalability: new design may give us the flexibility to
-address scalability as part of cluster design. Think about
-relationship to federation and "fragmented queues" idea.
+The standalone broker processes _connections_ concurrently, so CPU
+usage increases as you add more connections.
+
+The new cluster processes _queues_ concurrently, so CPU usage increases as you
+add more queues.
 
-* Design debates/descisions
+In both cases, CPU usage peaks when the number of "units of
+ concurrency" (connections or queues) goes above the number of cores.
 
+When all consumers on a queue are connected to the same broker the new
+cluster uses the same messagea allocation threading/logic as a
+standalone broker, with a little extra asynchronous book-keeping.
+
+If a queue has multiple consumers connected to multiple brokers, the
+new cluster time-shares the queue which is less efficient than having
+all consumers on a queue connected to the same broker.
+
+** Flow control
+New design does not queue up CPG delivered messages, they are
+processed immediately in the CPG deliver thread. This means that CPG's
+flow control is sufficient for qpid.
+
+** Live upgrades
+
+Live upgrades refers to the ability to upgrade a cluster while it is
+running, with no downtime. Each brokers in the cluster is shut down,
+and then re-started with a new version of the broker code.
+
+To achieve this
+- Cluster protocl XML file has a new element <version number=N> attached
+  to each method. This is the version at which the method was added.
+- New versions can only add methods, existing methods cannot be changed.
+- The cluster handshake for new members includes the protocol version
+  at each member.
+- The cluster's version is the lowest version among its members.
+- A newer broker can join and older cluster. When it does, it must restrict 
+  itself to speaking the older version protocol.
+- When the cluster version increases (because the lowest version member has left)
+  the remaining members may move up to the new version.
+
+
+* Design debates
 ** Active/active vs. active passive
 
 An active-active cluster can be used in an active-passive mode. In
@@ -385,7 +325,7 @@ An active/passive implementation allows 
 - can do immediate local enqueue and still guarantee order.
 
 Active/passive introduces a few extra requirements:
-- Exactly one broker hast to take over if primary fails.
+- Exactly one broker has to take over if primary fails.
 - Passive members must refuse client connections.
 - On failover, clients must re-try all known addresses till they find the active member.
 
@@ -393,43 +333,17 @@ Active/active benefits:
 - A broker failure only affects the subset of clients connected to that broker.
 - Clients can switch to any other broker on failover
 - Backup brokers are immediately available on failover.
-- Some load sharing: reading from client + multicast only done on direct node.
-
-Active/active drawbacks:
-- Co-ordinating message acquisition may impact performance (not tested)
-- Code may be more complex that active/passive.
+- As long as a client can connect to any broker in the cluster, it can be served.
 
 Active/passive benefits:
-- Don't need message allocation strategy, can feed consumers at top speed.
-- Code may be simpler than active/active.
+- Don't need to replicate message allocation, can feed consumers at top speed.
 
 Active/passive drawbacks:
 - All clients on one node so a failure affects every client in the system.
 - After a failure there is a "reconnect storm" as every client reconnects to the new active node.
 - After a failure there is a period where no broker is active, until the other brokers realize the primary is gone and agree on the new primary.
 - Clients must find the single active node, may involve multiple connect attempts.
+- No service if a partition separates a client from the active broker,
+  even if the client can see other brokers.
 
-** Total ordering.
-
-Initial thinking: allow message ordering to differ between brokers.
-New thinking: use CPG total ordering, get identical ordering on all brokers.
-- Allowing variation in order introduces too much chance of unexpected behavior.
-- Usign total order allows other optimizations, see Message Identifiers below.
-
-** Message identifiers.
-
-Initial thinking: message ID = CPG node id + 64 bit sequence number.
-This involves a lot of mapping between cluster IDs and broker messsages.
-
-New thinking: message ID = queue name + queue position.
-- Removes most of the mapping and memory management for cluster code.
-- Requires total ordering of messages (see above)
-
-** Message rejection
-
-Initial thinking: add special reject/rejected points to cluster interface so
-rejected messages could be re-queued without multicast.
 
-New thinking: treat re-queueing after reject as entirely new message.
-- Simplifies cluster interface & implementation
-- Not on the critical path.

Modified: qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-plan.txt
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-plan.txt?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-plan.txt (original)
+++ qpid/branches/qpid-3346/qpid/cpp/design_docs/new-cluster-plan.txt Fri Oct 28 15:52:13 2011
@@ -17,376 +17,156 @@
 # specific language governing permissions and limitations
 # under the License.
 
+* Status of impementation
 
-Notes on new cluster implementation. See also: new-cluster-design.txt
+Meaning of priorities:
+[#A] Essential for basic functioning.
+[#B] Required for first release.
+[#C] Can be addressed in a later release.
 
-* Implementation plan.
+The existig prototype is bare bones to do performance benchmarks:
+- Implements publish and consumer locking protocol.
+- Defered delivery and asynchronous completion of message.
+- Optimize the case all consumers are on the same node.
+- No new member updates, no failover updates, no transactions, no persistence etc.
 
-Co-existence with old cluster code and tests:
-- Separate plugin cluster2, options --cluster2-*. Eventually renamed to replace cluster.
-- Double up tests with old version/new version as the new code develops.
-
-Minimal POC for message delivery & perf test.
-- no wiring replication, no updates, no failover, no persistence, no async completion.
-- just implement publish and acquire/dequeue locking protocol.
-- optimize the special case where all consumers are on the same node.
-- measure performance: compare active-passive and active-active modes of use.
-
-Full implementation of transient cluster
-- Update (based on existing update), async completion etc.
-- Passing all existing transient cluster tests.
-
-Persistent cluster
-- Make sure async completion works correctly.
-- InitialStatus protoocl etc. to support persistent start-up (existing code)
-- cluster restart from store: stores not identical. Load one, update the rest.
- - assign cluster ID's to messages recovered from store, don't replicate.
-
-Improved update protocol
-- per-queue, less stalling, bounded catch-up.
-
-* Task list
-
-** TODO [#A] Minimal POC: publish/acquire/dequeue protocol.
-
-NOTE: as implementation questions arise, take the easiest option and make
-a note for later optimization/improvement.
-
-*** Tests
-- python test: 4 senders, numbered messages, 4 receivers, verify message set.
-- acquire then release messages: verify can be dequeued on any member
-- acquire then kill broker: verify can be dequeued other members.
-- acquire then reject: verify goes on alt-exchange once only.
-
-*** DONE broker::Cluster interface and call points.
-
-Initial interface commited.
-
-*** Main classes
-
-BrokerHandler:
-- implements broker::Cluster intercept points.
-- sends mcast events to inform cluster of local actions.
-- thread safe, called in connection threads.
-
-LocalMessageMap:
-- Holds local messages while they are being enqueued.
-- thread safe: called by both BrokerHandler and MessageHandler
-
-MessageHandler:
-- handles delivered mcast messages related to messages.
-- initiates local actions in response to mcast events.
-- thread unsafe, only called in deliver thread.
-- maintains view of cluster state regarding messages.
-
-QueueOwnerHandler:
-- handles delivered mcast messages related to queue consumer ownership.
-- thread safe, called in deliver, connection and timer threads.
-- maintains view of cluster state regarding queue ownership.
-
-cluster::Core: class to hold new cluster together (replaces cluster::Cluster)
-- thread safe: manage state used by both MessageHandler and BrokerHandler
-
-The following code sketch illustrates only the "happy path" error handling
-is omitted.
-
-*** BrokerHandler
-Types:
-- struct QueuedMessage { Message msg; QueueName q; SequenceNumber position; }
-- struct
-
-NOTE:
-- Messages on queues are identified by a queue name + a position.
-- Messages being routed are identified by a sequence number.
-
-Members:
-- thread_local bool noReplicate // suppress replication.
-- thread_local bool isRouting // suppress operations while routing
-- Message localMessage[SequenceNumber] // local messages being routed.
-- thread_local SequenceNumber routingSequence
-
-NOTE: localMessage is also modified by MessageHandler.
-
-broker::Cluster intercept functions:
-
-routing(msg)
-  if noReplicate: return
-  # Supress everything except enqueues while we are routing.
-  # We don't want to replicate acquires & dequeues caused by an enqueu,
-  # e.g. removal of messages from ring/LV queues.
-  isRouting = true
-
-enqueue(qmsg):
-  if noReplicate: return
-  if routingSequence == 0 # thread local
-    routingSequence = nextRoutingSequence()
-    mcast create(encode(qmsg.msg),routingSeq)
-  mcast enqueue(qmsg.q,routingSeq)
-
-routed(msg):
-  if noReplicate: return
-  isRouting = false
-
-acquire(qmsg):
-  if noReplicate: return
-  if isRouting: return # Ignore while we are routing a message.
-  if msg.id: mcast acquire(qmsg)
-
-release(QueuedMessage)
-  if noReplicate: return
-  if isRouting: return # Ignore while we are routing a message.
-  mcast release(qmsg)
-
-accept(QueuedMessage):
-  if noReplicate: return
-  if isRouting: return # Ignore while we are routing a message.
-  mcast accept(qmsg)
-
-reject(QueuedMessage):
-  isRejecting = true
-  mcast reject(qmsg)
-
-# FIXME no longer needed?
-drop(QueuedMessage)
-  cleanup(qmsg)
-
-*** MessageHandler and mcast messages
-Types:
-- struct QueueEntry { QueuedMessage qmsg; NodeId acquired; }
-- struct QueueKey { MessageId id; QueueName q; }
-- typedef map<QueueKey, QueueEntry> Queue
-- struct Node { Message routing[SequenceNumber]; list<QueueKey> acquired; }
-
-Members:
-- QueueEntry enqueued[QueueKey]
-- Node node[NodeId]
-
-Mcast messages in Message class:
-
-create(msg,seq)
-  if sender != self: node[sender].routing[seq] = decode(msg)
-
-enqueue(q,seq):
-  id = (sender,seq)
-  if sender == self:
-    enqueued[id,q] = (localMessage[seq], acquired=None)
-  else:
-    msg = sender.routing[seq]
-    enqueued[id,q] = (qmsg, acquired=None)
-    with noReplicate=true: qmsg = broker.getQueue(q).push(msg)
-
-routed(seq):
-  if sender == self: localMessage.erase(msg.id.seq)
-  else: sender.routing.erase(seq)
-
-acquire(id,q):
-  enqueued[id,q].acquired = sender
-  node[sender].acquired.push_back((id,q))
-  if sender != self:
-    with noReplicate=true: broker.getQueue(q).acquire(enqueued[id,q])
-
-release(id,q)
-  enqueued[id,q].acquired = None
-  node[sender].acquired.erase((id,q))
-  if sender != self
-    with noReplicate=true: broker.getQueue(q).requeue(enqueued[id,q])
-
-reject(id,q):
-  sender.routing[id] = enqueued[id,q] # prepare for re-queueing
-
-rejected(id,q)
-  sender.routing.erase[id]
-
-dequeue(id,q)
-  entry = enqueued[id,q]
-  enqueued.erase[id,q]
-  node[entry.acquired].acquired.erase(id,q)
-  if sender != self:
-    with noReplicate=true: broker.getQueue(q).dequeue(entry.qmsg)
-
-member m leaves cluster:
-  for key in node[m].acquired:
-   release(key.id, key.q)
-  node.erase(m)
-
-*** Queue consumer locking
-
-When a queue is locked it does not deliver messages to its consumers.
-
-New broker::Queue functions:
-- stopConsumers(): set consumersStopped flag, wait for currently busy consumers to exit.
-- startConsumers(): reset consumersStopped flag
-
-Implementation sketch, locking omitted:
-
-void Queue::stopConsumers() {
-  consumersStopped = true;
-  while (consumersBusy) consumersBusyMonitor.wait();
-}
-
-void Queue::startConsumers() {
-  consumersStopped = false;
-  listeners.notify();
-}
-
-bool Queue::dispatch(consumer) {
-   if (consumersStopped) return false;
-   ++consumersBusy;
-   do_regular_dispatch_body()
-   if (--consumersBusy == 0) consumersBusyMonitor.notify();
-}
-
-*** QueueOwnerHandler
-
-Invariants:
-- Each queue is owned by at most one node at any time.
-- Each node is interested in a set of queues at any given time.
-- A queue is un-owned if no node is interested.
-
-The queue owner releases the queue when
-- it loses interest i.e. queue has no consumers with credit.
-- a configured time delay expires and there are other interested nodes.
-
-The owner mcasts release(q). On delivery the new queue owner is the
-next node in node-id order (treating nodes as a circular list)
-starting from the old owner that is interested in the queue.
-
-Queue consumers initially are stopped, only started when we get
-ownership from the cluster.
-
-Thread safety: called by deliver, connection and timer threads, needs locking.
-
-Thread safe object per queue holding queue ownership status.
-Called by deliver, connection and timer threads.
-
-class QueueOwnership {
-  bool owned;
-  Timer timer;
-  BrokerQueue q;
-
-  drop(): # locked
-    if owned:
-      owned = false
-      q.stopConsumers()
-      mcast release(q.name, false)
-      timer.stop()
-
-  take(): # locked
-    if not owned:
-      owned = true
-      q.startConsumers()
-      timer.start(timeout)
-
-  timer.fire(): drop()
-}
-
-Data Members, only modified/examined in deliver thread:
-- typedef set<NodeId> ConsumerSet
-- map<QueueName, ConsumerSet> consumers
-- map<QueueName, NodeId> owner
-
-Thread safe data members, accessed in connection threads (via BrokerHandler):
-- map<QueueName, QueueOwnership> ownership
-
-Multicast messages in QueueOwner class:
-
-consume(q):
-  if sender==self and consumers[q].empty(): ownership[q].take()
-  consumers[q].insert(sender)
-
-release(q):
-  asssert(owner[q] == sender and owner[q] in consumers[q])
-  owner[q] = circular search from sender in consumers[q]
-  if owner==self: ownership[q].take()
-
-cancel(q):
-  assert(queue[q].owner != sender) # sender must release() before cancel()
-  consumers[q].erase(sender)
-
-member-leaves:
-  for q in queue: if owner[q] = left: left.release(q)
-
-Need 2 more intercept points in broker::Cluster:
-
-consume(q,consumer,consumerCount) - Queue::consume()
-  if consumerCount == 1: mcast consume(q)
-
-cancel(q,consumer,consumerCount) - Queue::cancel()
-  if consumerCount == 0:
-    ownership[q].drop()
-  mcast cancel(q)
-
-#TODO: lifecycle, updating cluster data structures when queues are destroyed
-
-*** Increasing concurrency
-The major performance limitation of the old cluster is that it does
-everything in the single CPG deliver thread context.
-
-We can get additional concurrency by creating a thread context _per queue_
-for queue operations: enqueue, acquire, accept etc.
-
-We associate a PollableQueue of queue operations with each AMQP queue.
-The CPG deliver thread would
-- build messages and associate with cluster IDs.
-- push queue ops to the appropriate PollableQueue to be dispatched the queues thread.
-
-Serializing operations on the same queue avoids contention, but takes advantage
-of the independence of operations on separate queues.
-
-*** Re-use of existing cluster code
-- re-use Event
-- re-use Multicaster
-- re-use same PollableQueueSetup (may experiment later)
-- new Core class to replace Cluster.
-- keep design modular, keep threading rules clear.
-
-** TODO [#B] Large message replication.
-Multicast should encode messages in fixed size buffers (64k)?
-Can't assume we can send message in one chunk.
-For 0-10 can use channel numbers & send whole frames packed into larger buffer.
-** TODO [#B] Transaction support.
-Extend broker::Cluster interface to capture transaction context and completion.
-Sequence number to generate per-node tx IDs.
-Replicate transaction completion.
-** TODO [#B] Batch CPG multicast messages
-The new cluster design involves a lot of small multicast messages,
-they need to be batched into larger CPG messages for efficiency.
-** TODO [#B] Genuine async completion
-Replace current synchronous waiting implementation with genuine async completion.
+Prototype code is on branch qpid-2920-active, in cpp/src/qpid/cluster/exp/
 
-Test: enhance test_store.cpp to defer enqueueComplete till special message received.
+** Similarities to existing cluster.
 
-Async callback uses *requestIOProcessing* to queue action on IO thread.
+/Active-active/: the new cluster can be a drop-in replacement for the
+old, existing tests & customer deployment configurations are still
+valid.
 
-** TODO [#B] Async completion of accept when dequeue completes.
-Interface is already there on broker::Message, just need to ensure
-that store and cluster implementations call it appropriately.
+/Virtual synchrony/: Uses corosync to co-ordinate activity of members.
 
-** TODO [#B] Replicate wiring.
-From messageStore create/destroy/bind, replicate encoded declare/destroy/bind command.
+/XML controls/: Uses XML to define the primitives multicast to the
+cluster.
 
-** TODO [#B] New members joining - first pass
+** Differences with existing cluster.
 
-Re-use update code from old cluster but don't replicate sessions &
-connections.
+/Report rather than predict consumption/: brokers explicitly tell each
+other which messages have been acquired or dequeued. This removes the
+major cause of bugs in the existing cluster.
 
-Need to extend it to send cluster IDs with messages.
+/Queue consumer locking/: to avoid duplicates only one broker can acquire or
+dequeue messages at a time - while has the consume-lock on the
+queue. If multiple brokers are consuming from the same queue the lock
+is passed around to time-share access to the queue.
 
-Need to replicate the queue ownership data as part of the update.
+/Per-queue concurrency/: uses a fixed-size set of CPG groups (reflecting
+the concurrency of the host) to allow concurrent processing on
+different queues. Queues are hashed onto the groups.
 
-** TODO [#B] Persistence support.
-InitialStatus protoocl etc. to support persistent start-up (existing code)
+* Completed tasks
+** DONE [#A] Minimal POC: publish/acquire/dequeue protocol.
+   CLOSED: [2011-10-05 Wed 16:03]
 
-Only one broker recovers from store, update to others.
+Defines broker::Cluster interface and call points.
+Initial interface commite
 
-Assign cluster IDs to messages recovered from store, don't replicate. See Queue::recover.
+Main classes
+Core: central object holding cluster classes together (replaces cluster::Cluster)
+BrokerContext: implements broker::Cluster interface.
+QueueContext: Attached to a broker::Queue, holds cluster status.
+MessageHolder:holds local messages while they are being enqueued.
+
+Implements multiple CPG groups for better concurrency.
+
+** DONE [#A] Large message replication.
+   CLOSED: [2011-10-05 Wed 17:22]
+Multicast using fixed-size (64k) buffers, allow fragmetation of messages across buffers (frame by frame)
+
+* Open questions
+
+** TODO [#A] Queue sequence numbers vs. independant message IDs.
+   SCHEDULED: <2011-10-07 Fri>
+
+Current prototype uses queue sequence numbers to identify
+message. This is tricky for updating new members as the sequence
+numbers are only known on delivery.
+
+Independent message IDs that can be generated and sent with the message simplify
+this and potentially allow performance benefits by relaxing total ordering.
+However they imply additional map lookups that might hurt performance.
+
+- [X] Prototype independent message IDs, check performance.
+Throughput worse by 30% in contented case, 10% in uncontended.
+Sticking with queue sequence numbers.
+
+* Outstanding Tasks
+** TODO [#A] Defer and async completion of wiring commands.
+
+Testing requirement: Many tests assume wiring changes are visible
+across the cluster once the commad completes.
+
+Name clashes: need to avoid race if same name queue/exchange declared
+on 2 brokers simultaneously
+
+** TODO [#A] Passing all existing cluster tests.
+
+The new cluster should be a drop-in replacement for the old, so it
+should be able to pass all the existing tests.
+
+** TODO [#A] Update to new members joining.
+
+Need to resolve [[Queue sequence numbers vs. independant message IDs]] first.
+- implicit sequence numbers are more tricky to replicate to new member.
+
+Update individual  objects (queues and exchanges) independently.
+- create queues first, then update all queues and exchanges in parallel.
+- multiple updater threads, per queue/exchange.
+- updater sends messages to special exchange(s) (not using extended AMQP controls)
+
+Queue updater:
+- marks the queue position at the sync point
+- sends messages starting from the sync point working towards the head of the queue.
+- send "done" message.
+Note: updater remains active throughout, consuming clients actually reduce the
+size of the update.
+
+Queue updatee:
+- enqueues received from CPG: add to back of queue as normal.
+- dequeues received from CPG: apply if found, else save to check at end of update.
+- messages from updater: add to the *front* of the queue.
+- update complete: apply any saved dequeues.
 
-** TODO [#B] Handle other ways that messages can leave a queue.
+Exchange updater:
+- updater: send snapshot of exchange as it was at the sync point.
 
-Other ways (other than via a consumer) that messages are take off a queue.
+Exchange updatee:
+- queue exchange operations after the sync point.
+- when snapshot is received: apply saved operations.
 
-NOTE: Not controlled by queue lock, how to make them consistent?
+Updater remains active throughout.
+Updatee stalls clients until the update completes.
 
+Updating queue/exchange/binding objects is via the same encode/decode
+that is used by the store. Updatee to use recovery interfaces to
+recover?
+
+** TODO [#A] Failover updates to client.
+Implement the amq.failover exchange to notify clients of membership.
+
+** TODO [#B] Initial status protocol.
+Handshake to give status of each broker member to new members joining.
+Status includes
+- persistent store state (clean, dirty)
+- cluster protocol version.
+
+** TODO [#B] Replace boost::hash with our own hash function.
+The hash function is effectively part of the interface so
+we need to be sure it doesn't change underneath us.
+
+** TODO [#B] Persistent cluster support.
+Initial status protoocl to support persistent start-up (see existing code)
+
+Only one broker recovers from store, update to others.
+
+Assign cluster IDs to messages recovered from store, don't replicate. See Queue::recover.
+
+** TODO [#B] Management support
+Replicate management methods that modify queues - e.g. move, purge.
 Target broker may not have all messages on other brokers for purge/destroy.
 - Queue::move() - need to wait for lock? Replicate?
 - Queue::get() - ???
@@ -395,66 +175,48 @@ Target broker may not have all messages 
 
 Need to add callpoints & mcast messages to replicate these?
 
-** TODO [#B] Flow control for internal queues.
+** TODO [#B] TX transaction support.
+Extend broker::Cluster interface to capture transaction context and completion.
+Running brokers exchange TX information.
+New broker update includes TX information.
+
+    // FIXME aconway 2010-10-18: As things stand the cluster is not
+    // compatible with transactions
+    // - enqueues occur after routing is complete
+    // - no call to Cluster::enqueue, should be in Queue::process?
+    // - no transaction context associated with messages in the Cluster interface.
+    // - no call to Cluster::accept in Queue::dequeueCommitted
+
+** TODO [#B] DTX transaction support.
+Extend broker::Cluster interface to capture transaction context and completion.
+Running brokers exchange DTX information.
+New broker update includes DTX information.
+
+** TODO [#B] Async completion of accept.
+When this is fixed in the standalone broker, it should be fixed for cluster.
+
+** TODO [#B] Network partitions and quorum.
+Re-use existing implementation.
 
-Need to bound the size of internal queues: delivery and multicast.
-- stop polling for read on client connections when we reach a bound.
-- restart polling when we get back under it.
-
-That will stop local multicasting, we still have to deal with remote
-multicasting (note existing cluster does not do this.) Something like:
-- when over bounds multicast a flow-control event.
-- on delivery of flow-control all members stop polling to read client connections
-- when back under bounds send flow-control-end, all members resume
-- if flow-controling member dies others resume
-
-** TODO [#B] Integration with transactions.
-Do we want to replicate during transaction & replicate commit/rollback
-or replicate only on commit?
-No integration with DTX transactions.
-** TODO [#B] Make new cluster work with replication exchange.
-Possibly re-use some common logic. Replication exchange is like clustering
-except over TCP.
-** TODO [#B] Better concurrency, scalabiility on multi-cores.
-Introduce PollableQueue of operations per broker queue. Queue up mcast
-operations (enqueue, acquire, accept etc.) to be handled concurrently
-on different queue. Performance testing to verify improved scalability.
-** TODO [#C] Async completion for declare, bind, destroy queues and exchanges.
-Cluster needs to complete these asynchronously to guarantee resources
-exist across the cluster when the command completes.
+** TODO [#B] Review error handling, put in a consitent model.
+- [ ] Review all asserts, for possible throw.
+- [ ] Decide on fatal vs. non-fatal errors.
+
+** TODO [#B] Implement inconsistent error handling policy.
+What to do if a message is enqueued sucessfully on the local broker,
+but fails on one or more backups - e.g. due to store limits?
+- we have more flexibility, we don't *have* to crash
+- but we've loste some of our redundancy guarantee, how should we inform client? 
 
 ** TODO [#C] Allow non-replicated exchanges, queues.
 
-Set qpid.replicated=false in declare arguments, set flag on Exchange, Queue objects.
+Set qpid.replicate=false in declare arguments, set flag on Exchange, Queue objects.
 - save replicated status to store.
 - support in management tools.
-Replicated exchange: replicate binds to replicated queues.
 Replicated queue: replicate all messages.
+Replicated exchange: replicate bindings to replicated queues only.
 
-** TODO [#C] New members joining - improved.
-
-Replicate wiring like old cluster, stall for wiring but not for
-messages.  Update messages on a per-queue basis from back to front.
-
-Updater:
-- stall & push wiring: declare exchanges, queues, bindings.
-- start update iterator thread on each queue.
-- unstall and process normally while iterator threads run.
-
-Update iterator thread:
-- starts at back of updater queue, message m.
-- send update_front(q,m) to updatee and advance towards front
-- at front: send update_done(q)
-
-Updatee:
-- stall, receive wiring, lock all queues, mark queues "updating", unstall
-- update_front(q,m): push m to *front* of q
-- update_done(q): mark queue "ready"
-
-Updatee cannot take the queue consume lock for a queue that is  updating.
-Updatee *can* push messages onto a queue that is updating.
-
-TODO: Is there any way to eliminate the stall for wiring?
+Configurable default? Defaults to true.
 
 ** TODO [#C] Refactoring of common concerns.
 
@@ -469,9 +231,46 @@ Look for ways to capitalize on the simil
 
 In particular QueuedEvents (async replication) strongly resembles
 cluster replication, but over TCP rather than multicast.
-** TODO [#C] Concurrency for enqueue events.
-All enqueue events are being processed in the CPG deliver thread context which
-serializes all the work. We only need ordering on a per queue basis, can we
-enqueue in parallel on different queues and will that improve performance?
+
 ** TODO [#C] Handling immediate messages in a cluster
 Include remote consumers in descision to deliver an immediate message?
+** TODO [#C] Remove old cluster hacks and workarounds
+The old cluster has workarounds in the broker code that can be removed.
+- [ ] drop code to replicate management model.
+- [ ] drop timer workarounds for TTL, management, heartbeats.
+- [ ] drop "cluster-safe assertions" in broker code.
+- [ ] drop connections, sessions, management from cluster update.
+- [ ] drop security workarounds: cluster code now operates after message decoding.
+- [ ] drop connection tracking in cluster code.
+- [ ] simpler inconsistent-error handling code, no need to stall.
+
+** TODO [#C] Support for live upgrades.
+
+Allow brokers in a running cluster to be replaced one-by-one with a new version.
+(see new-cluster-design for design notes.)
+
+The old cluster protocol was unstable because any changes in broker
+state caused changes to the cluster protocol.The new design should be
+much more stable.
+
+Points to implement in anticipation of live upgrade:
+- Prefix each CPG message with a version number and length.
+  Version number determines how to decode the message.
+- Brokers ignore messages that have a higher version number than they understand.
+- Protocol version XML element in cluster.xml, on each control.
+- Initial status protocol to include protocol version number.
+
+New member udpates: use the store encode/decode for updates, use the
+same backward compatibility strategy as the store. This allows for
+adding new elements to the end of structures but not changing or
+removing new elements.
+
+** TODO [#C] Support for AMQP 1.0.
+
+* Testing
+** TODO [#A] Pass all existing cluster tests.
+Requires [[Defer and async completion of wiring commands.]]
+** TODO [#A] New cluster tests.
+Stress tests & performance benchmarks focused on changes in new cluster:
+- concurrency by queues rather than connections.
+- different handling shared queues when consuemrs are on different brokers.

Propchange: qpid/branches/qpid-3346/qpid/cpp/docs/api/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:52:13 2011
@@ -4,4 +4,4 @@
 /qpid/branches/0.6-release-windows-installer/qpid/cpp/docs/api:926803,927233
 /qpid/branches/java-network-refactor/qpid/cpp/docs/api:805429-825319
 /qpid/branches/qpid-2935/qpid/cpp/docs/api:1061302-1072333
-/qpid/trunk/qpid/cpp/docs/api:1144319-1179750
+/qpid/trunk/qpid/cpp/docs/api:1144319-1190375

Modified: qpid/branches/qpid-3346/qpid/cpp/docs/man/qpidd.1
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/docs/man/qpidd.1?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/docs/man/qpidd.1 (original)
+++ qpid/branches/qpid-3346/qpid/cpp/docs/man/qpidd.1 Fri Oct 28 15:52:13 2011
@@ -132,6 +132,10 @@ at which an event will be raised
 Group identifier to assign to messages
 delivered to a message group queue that
 do not contain an identifier.
+.TP
+\fB\-\-enable\-timestamp\fR yes|no (0)
+Add current time to each received
+message.
 .SS "Logging options:"
 .TP
 \fB\-t\fR [ \fB\-\-trace\fR ]

Propchange: qpid/branches/qpid-3346/qpid/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:52:13 2011
@@ -3,4 +3,4 @@
 /qpid/branches/0.6-release-windows-installer/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj:926803,927218,927233
 /qpid/branches/java-network-refactor/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj:805429-825319
 /qpid/branches/qpid-2935/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj:1061302-1072333
-/qpid/trunk/qpid/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj:1144319-1179750
+/qpid/trunk/qpid/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj:1144319-1190375

Propchange: qpid/branches/qpid-3346/qpid/cpp/include/qmf/engine/Agent.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:52:13 2011
@@ -1,2 +1,2 @@
 /qpid/branches/qpid-2935/qpid/cpp/include/qmf/engine/Agent.h:1061302-1072333
-/qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h:1144319-1179750
+/qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h:1144319-1190375

Propchange: qpid/branches/qpid-3346/qpid/cpp/include/qmf/engine/Console.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:52:13 2011
@@ -1,2 +1,2 @@
 /qpid/branches/qpid-2935/qpid/cpp/include/qmf/engine/Console.h:1061302-1072333
-/qpid/trunk/qpid/cpp/include/qmf/engine/Console.h:1144319-1179750
+/qpid/trunk/qpid/cpp/include/qmf/engine/Console.h:1144319-1190375

Propchange: qpid/branches/qpid-3346/qpid/cpp/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Oct 28 15:52:13 2011
@@ -0,0 +1,7 @@
+/qpid/branches/0.5.x-dev/qpid/cpp/src:892761,894875
+/qpid/branches/0.6-release-windows-installer/cpp/src:926803
+/qpid/branches/0.6-release-windows-installer/qpid/cpp/src:926803,927233
+/qpid/branches/QPID-2519/cpp/src:1072051-1079078
+/qpid/branches/java-network-refactor/qpid/cpp/src:805429-825319
+/qpid/branches/qpid-2935/qpid/cpp/src:1061302-1072333
+/qpid/trunk/qpid/cpp/src:1144319-1190375

Modified: qpid/branches/qpid-3346/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/CMakeLists.txt?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/CMakeLists.txt Fri Oct 28 15:52:13 2011
@@ -665,6 +665,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
 
   set (qpidd_platform_SOURCES
     windows/QpiddBroker.cpp
+    windows/SCM.cpp
   )
 
   set (qpidmessaging_platform_SOURCES

Propchange: qpid/branches/qpid-3346/qpid/cpp/src/CMakeLists.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:52:13 2011
@@ -1,6 +1,7 @@
 /qpid/branches/0.5.x-dev/qpid/cpp/src/CMakeLists.txt:892761,894875
 /qpid/branches/0.6-release-windows-installer/cpp/src/CMakeLists.txt:926803
 /qpid/branches/0.6-release-windows-installer/qpid/cpp/src/CMakeLists.txt:926803,927233,932132
+/qpid/branches/QPID-2519/cpp/src/CMakeLists.txt:1072051-1079078
 /qpid/branches/java-network-refactor/qpid/cpp/src/CMakeLists.txt:805429-825319
 /qpid/branches/qpid-2935/qpid/cpp/src/CMakeLists.txt:1061302-1072333
-/qpid/trunk/qpid/cpp/src/CMakeLists.txt:1144319-1179750
+/qpid/trunk/qpid/cpp/src/CMakeLists.txt:1144319-1190375

Modified: qpid/branches/qpid-3346/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/Makefile.am?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/Makefile.am (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/Makefile.am Fri Oct 28 15:52:13 2011
@@ -54,6 +54,8 @@ windows_dist = \
   qpid/sys/windows/uuid.cpp \
   qpid/sys/windows/uuid.h \
   windows/QpiddBroker.cpp \
+  windows/SCM.h \
+  windows/SCM.cpp \
   qpid/broker/windows/BrokerDefaults.cpp \
   qpid/broker/windows/SaslAuthenticator.cpp \
   qpid/broker/windows/SslProtocolFactory.cpp \
@@ -497,6 +499,7 @@ libqpidcommon_la_SOURCES +=			\
   qpid/sys/Waitable.h				\
   qpid/sys/alloca.h				\
   qpid/sys/uuid.h				\
+  qpid/sys/unordered_map.h			\
   qpid/amqp_0_10/Codecs.cpp
 
 if HAVE_SASL

Modified: qpid/branches/qpid-3346/qpid/cpp/src/posix/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/posix/QpiddBroker.cpp?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/posix/QpiddBroker.cpp (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/posix/QpiddBroker.cpp Fri Oct 28 15:52:13 2011
@@ -196,3 +196,8 @@ int QpiddBroker::execute (QpiddOptions *
     }
     return 0;
 }
+
+int main(int argc, char* argv[])
+{
+    return run_broker(argc, argv);
+}

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qmf.mk
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qmf.mk?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qmf.mk (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qmf.mk Fri Oct 28 15:52:13 2011
@@ -93,6 +93,7 @@ libqmf2_la_SOURCES = 		\
   qmf/AgentEventImpl.h		\
   qmf/AgentImpl.h		\
   qmf/AgentSession.cpp		\
+  qmf/AgentSessionImpl.h	\
   qmf/AgentSubscription.cpp	\
   qmf/AgentSubscription.h	\
   qmf/ConsoleEvent.cpp		\
@@ -106,19 +107,21 @@ libqmf2_la_SOURCES = 		\
   qmf/Data.cpp			\
   qmf/DataImpl.h		\
   qmf/EventNotifierImpl.cpp	\
-  qmf/PosixEventNotifier.cpp	\
-  qmf/PosixEventNotifierImpl.cpp \
+  qmf/EventNotifierImpl.h	\
   qmf/exceptions.cpp		\
   qmf/Expression.cpp		\
   qmf/Expression.h		\
   qmf/Hash.cpp			\
   qmf/Hash.h			\
+  qmf/PosixEventNotifier.cpp	\
+  qmf/PosixEventNotifierImpl.cpp \
+  qmf/PosixEventNotifierImpl.h	\
   qmf/PrivateImplRef.h		\
   qmf/Query.cpp			\
   qmf/QueryImpl.h		\
-  qmf/Schema.cpp		\
   qmf/SchemaCache.cpp		\
   qmf/SchemaCache.h		\
+  qmf/Schema.cpp		\
   qmf/SchemaId.cpp		\
   qmf/SchemaIdImpl.h		\
   qmf/SchemaImpl.h		\

Propchange: qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/Agent.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:52:13 2011
@@ -1,2 +1,2 @@
 /qpid/branches/qpid-2935/qpid/cpp/src/qmf/engine/Agent.cpp:1061302-1072333
-/qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp:1144319-1179750
+/qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp:1144319-1190375

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.cpp?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.cpp (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.cpp Fri Oct 28 15:52:13 2011
@@ -35,17 +35,17 @@ using qpid::framing::Uuid;
 SchemaHash::SchemaHash()
 {
     for (int idx = 0; idx < 16; idx++)
-        hash[idx] = 0x5A;
+        hash.b[idx] = 0x5A;
 }
 
 void SchemaHash::encode(Buffer& buffer) const
 {
-    buffer.putBin128(hash);
+    buffer.putBin128(hash.b);
 }
 
 void SchemaHash::decode(Buffer& buffer)
 {
-    buffer.getBin128(hash);
+    buffer.getBin128(hash.b);
 }
 
 void SchemaHash::update(uint8_t data)
@@ -55,12 +55,8 @@ void SchemaHash::update(uint8_t data)
 
 void SchemaHash::update(const char* data, uint32_t len)
 {
-    union h {
-        uint8_t  b[16];
-        uint64_t q[2];
-    }* h = reinterpret_cast<union h*>(&hash[0]);
-    uint64_t* first  = &h->q[0];
-    uint64_t* second = &h->q[1];
+    uint64_t* first  = &hash.q[0];
+    uint64_t* second = &hash.q[1];
     for (uint32_t idx = 0; idx < len; idx++) {
         *first = *first ^ (uint64_t) data[idx];
         *second = *second << 1;

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.h?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.h (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qmf/engine/SchemaImpl.h Fri Oct 28 15:52:13 2011
@@ -35,7 +35,10 @@ namespace engine {
     //       they've been registered.
 
     class SchemaHash {
-        uint8_t hash[16];
+        union h {
+            uint8_t  b[16];
+            uint64_t q[2];
+        } hash;
     public:
         SchemaHash();
         void encode(qpid::framing::Buffer& buffer) const;
@@ -47,7 +50,7 @@ namespace engine {
         void update(Direction d) { update((uint8_t) d); }
         void update(Access a) { update((uint8_t) a); }
         void update(bool b) { update((uint8_t) (b ? 1 : 0)); }
-        const uint8_t* get() const { return hash; }
+        const uint8_t* get() const { return hash.b; }
         bool operator==(const SchemaHash& other) const;
         bool operator<(const SchemaHash& other) const;
         bool operator>(const SchemaHash& other) const;

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qpid/RefCountedBuffer.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qpid/RefCountedBuffer.cpp?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qpid/RefCountedBuffer.cpp (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qpid/RefCountedBuffer.cpp Fri Oct 28 15:52:13 2011
@@ -20,19 +20,22 @@
  */
 
 #include "qpid/RefCountedBuffer.h"
+#include <stdlib.h>
 #include <new>
 
 namespace qpid {
 
 void RefCountedBuffer::released() const {
     this->~RefCountedBuffer();
-    ::delete[] reinterpret_cast<const char*>(this);
+    ::free (reinterpret_cast<void *>(const_cast<RefCountedBuffer *>(this)));
 }
 
 BufferRef RefCountedBuffer::create(size_t n) {
-    char* store=::new char[n+sizeof(RefCountedBuffer)];
+    void* store=::malloc (n + sizeof(RefCountedBuffer));
+    if (NULL == store)
+        throw std::bad_alloc();
     new(store) RefCountedBuffer;
-    char* start = store+sizeof(RefCountedBuffer);
+    char* start = reinterpret_cast<char *>(store) + sizeof(RefCountedBuffer);
     return BufferRef(
         boost::intrusive_ptr<RefCounted>(reinterpret_cast<RefCountedBuffer*>(store)),
         start, start+n);

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qpid/Sasl.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qpid/Sasl.h?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qpid/Sasl.h (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qpid/Sasl.h Fri Oct 28 15:52:13 2011
@@ -47,8 +47,8 @@ class Sasl
      *             client supports.
      * @param externalSecuritySettings security related details from the underlying transport
      */
-    virtual std::string start(const std::string& mechanisms,
-                              const qpid::sys::SecuritySettings* externalSecuritySettings = 0) = 0;
+    virtual bool start(const std::string& mechanisms, std::string& response,
+                       const qpid::sys::SecuritySettings* externalSecuritySettings = 0) = 0;
     virtual std::string step(const std::string& challenge) = 0;
     virtual std::string getMechanism() = 0;
     virtual std::string getUserId() = 0;

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qpid/SaslFactory.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qpid/SaslFactory.cpp?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qpid/SaslFactory.cpp (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qpid/SaslFactory.cpp Fri Oct 28 15:52:13 2011
@@ -112,7 +112,7 @@ class CyrusSasl : public Sasl
   public:
     CyrusSasl(const std::string & username, const std::string & password, const std::string & serviceName, const std::string & hostName, int minSsf, int maxSsf, bool allowInteraction);
     ~CyrusSasl();
-    std::string start(const std::string& mechanisms, const SecuritySettings* externalSettings);
+    bool start(const std::string& mechanisms, std::string& response, const SecuritySettings* externalSettings);
     std::string step(const std::string& challenge);
     std::string getMechanism();
     std::string getUserId();
@@ -210,7 +210,7 @@ namespace {
     const std::string SSL("ssl");
 }
 
-std::string CyrusSasl::start(const std::string& mechanisms, const SecuritySettings* externalSettings)
+bool CyrusSasl::start(const std::string& mechanisms, std::string& response, const SecuritySettings* externalSettings)
 {
     QPID_LOG(debug, "CyrusSasl::start(" << mechanisms << ")");
     int result = sasl_client_new(settings.service.c_str(),
@@ -283,7 +283,12 @@ std::string CyrusSasl::start(const std::
     mechanism = std::string(chosenMechanism);
     QPID_LOG(debug, "CyrusSasl::start(" << mechanisms << "): selected "
              << mechanism << " response: '" << std::string(out, outlen) << "'");
-    return std::string(out, outlen);
+    if (out) {
+        response = std::string(out, outlen);
+        return true;
+    } else {
+        return false;
+    }
 }
 
 std::string CyrusSasl::step(const std::string& challenge)

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qpid/acl/AclPlugin.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qpid/acl/AclPlugin.cpp?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qpid/acl/AclPlugin.cpp (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qpid/acl/AclPlugin.cpp Fri Oct 28 15:52:13 2011
@@ -69,7 +69,7 @@ struct AclPlugin : public Plugin {
     	}
 
         acl = new Acl(values, b);
-		b.setAcl(acl.get());
+        b.setAcl(acl.get());
         b.addFinalizer(boost::bind(&AclPlugin::shutdown, this));
     }
 

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.cpp?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.cpp Fri Oct 28 15:52:13 2011
@@ -43,6 +43,8 @@
 #include "qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h"
 #include "qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h"
 #include "qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h"
+#include "qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h"
+#include "qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h"
 #include "qmf/org/apache/qpid/broker/EventExchangeDeclare.h"
 #include "qmf/org/apache/qpid/broker/EventExchangeDelete.h"
 #include "qmf/org/apache/qpid/broker/EventQueueDeclare.h"
@@ -125,7 +127,8 @@ Broker::Options::Options(const std::stri
     queueFlowStopRatio(80),
     queueFlowResumeRatio(70),
     queueThresholdEventRatio(80),
-    defaultMsgGroup("qpid.no-group")
+    defaultMsgGroup("qpid.no-group"),
+    timestampRcvMsgs(false)     // set the 0.10 timestamp delivery property
 {
     int c = sys::SystemInfo::concurrency();
     workerThreads=c+1;
@@ -162,7 +165,8 @@ Broker::Options::Options(const std::stri
         ("default-flow-stop-threshold", optValue(queueFlowStopRatio, "PERCENT"), "Percent of queue's maximum capacity at which flow control is activated.")
         ("default-flow-resume-threshold", optValue(queueFlowResumeRatio, "PERCENT"), "Percent of queue's maximum capacity at which flow control is de-activated.")
         ("default-event-threshold-ratio", optValue(queueThresholdEventRatio, "%age of limit"), "The ratio of any specified queue limit at which an event will be raised")
-        ("default-message-group", optValue(defaultMsgGroup, "GROUP-IDENTIFER"), "Group identifier to assign to messages delivered to a message group queue that do not contain an identifier.");
+        ("default-message-group", optValue(defaultMsgGroup, "GROUP-IDENTIFER"), "Group identifier to assign to messages delivered to a message group queue that do not contain an identifier.")
+        ("enable-timestamp", optValue(timestampRcvMsgs, "yes|no"), "Add current time to each received message.");
 }
 
 const std::string empty;
@@ -301,6 +305,11 @@ Broker::Broker(const Broker::Options& co
     else
         QPID_LOG(info, "Management not enabled");
 
+    // this feature affects performance, so let's be sure that gets logged!
+    if (conf.timestampRcvMsgs) {
+        QPID_LOG(notice, "Receive message timestamping is ENABLED.");
+    }
+
     /**
      * SASL setup, can fail and terminate startup
      */
@@ -492,9 +501,20 @@ Manageable::status_t Broker::ManagementM
       {
           _qmf::ArgsBrokerQuery& a = dynamic_cast<_qmf::ArgsBrokerQuery&>(args);
           status = queryObject(a.i_type, a.i_name, a.o_results, getManagementExecutionContext());
-          status = Manageable::STATUS_OK;
           break;
       }
+    case _qmf::Broker::METHOD_GETTIMESTAMPCONFIG:
+        {
+          _qmf::ArgsBrokerGetTimestampConfig& a = dynamic_cast<_qmf::ArgsBrokerGetTimestampConfig&>(args);
+          status = getTimestampConfig(a.o_receive, getManagementExecutionContext());
+          break;
+        }
+    case _qmf::Broker::METHOD_SETTIMESTAMPCONFIG:
+        {
+          _qmf::ArgsBrokerSetTimestampConfig& a = dynamic_cast<_qmf::ArgsBrokerSetTimestampConfig&>(args);
+          status = setTimestampConfig(a.i_receive, getManagementExecutionContext());
+          break;
+        }
    default:
         QPID_LOG (debug, "Broker ManagementMethod not implemented: id=" << methodId << "]");
         status = Manageable::STATUS_NOT_IMPLEMENTED;
@@ -517,6 +537,8 @@ const std::string EXCHANGE_TYPE("exchang
 const std::string QUEUE_NAME("queue");
 const std::string EXCHANGE_NAME("exchange");
 
+const std::string ATTRIBUTE_TIMESTAMP_0_10("timestamp-0.10");
+
 const std::string _TRUE("true");
 const std::string _FALSE("false");
 }
@@ -711,6 +733,31 @@ Manageable::status_t Broker::queryQueue(
     return Manageable::STATUS_OK;;
 }
 
+Manageable::status_t Broker::getTimestampConfig(bool& receive,
+                                                const ConnectionState* context)
+{
+    std::string name;   // none needed for broker
+    std::string userId = context->getUserId();
+    if (acl && !acl->authorise(userId, acl::ACT_ACCESS, acl::OBJ_BROKER, name, NULL))  {
+        throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied broker timestamp get request from " << userId));
+    }
+    receive = config.timestampRcvMsgs;
+    return Manageable::STATUS_OK;
+}
+
+Manageable::status_t Broker::setTimestampConfig(const bool receive,
+                                                const ConnectionState* context)
+{
+    std::string name;   // none needed for broker
+    std::string userId = context->getUserId();
+    if (acl && !acl->authorise(userId, acl::ACT_UPDATE, acl::OBJ_BROKER, name, NULL)) {
+        throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied broker timestamp set request from " << userId));
+    }
+    config.timestampRcvMsgs = receive;
+    QPID_LOG(notice, "Receive message timestamping is " << ((config.timestampRcvMsgs) ? "ENABLED." : "DISABLED."));
+    return Manageable::STATUS_OK;
+}
+
 void Broker::setLogLevel(const std::string& level)
 {
     QPID_LOG(notice, "Changing log level to " << level);

Modified: qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.h?rev=1190406&r1=1190405&r2=1190406&view=diff
==============================================================================
--- qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.h (original)
+++ qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker/Broker.h Fri Oct 28 15:52:13 2011
@@ -122,6 +122,7 @@ public:
         uint queueFlowResumeRatio;  // producer flow control: off
         uint16_t queueThresholdEventRatio;
         std::string defaultMsgGroup;
+        bool timestampRcvMsgs;
 
       private:
         std::string getHome();
@@ -164,6 +165,10 @@ public:
                                      const std::string& userId,
                                      const std::string& connectionId,
                                      qpid::types::Variant::Map& results);
+    Manageable::status_t getTimestampConfig(bool& receive,
+                                            const ConnectionState* context);
+    Manageable::status_t setTimestampConfig(const bool receive,
+                                            const ConnectionState* context);
     boost::shared_ptr<sys::Poller> poller;
     sys::Timer timer;
     std::auto_ptr<sys::Timer> clusterTimer;
@@ -315,6 +320,7 @@ public:
                           const boost::intrusive_ptr<Message>& msg)> deferDelivery;
 
     bool isAuthenticating ( ) { return config.auth; }
+    bool isTimestamping() { return config.timestampRcvMsgs; }
 
     typedef boost::function1<void, boost::shared_ptr<Queue> > QueueFunctor;
 



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