diff options
author | Keith Wall <kwall@apache.org> | 2015-03-12 14:16:16 +0000 |
---|---|---|
committer | Keith Wall <kwall@apache.org> | 2015-03-12 14:16:16 +0000 |
commit | c58b28b9b38a72e47f5b24a2b4e565c842e0858c (patch) | |
tree | fa0258e1685248c7bceadaa984d488cb37356c37 | |
parent | e8e05131324cf3137a3c65a95cad833cd3275c78 (diff) | |
parent | 08acb6bdc6ded10012ff4c2d2e303121b4985882 (diff) | |
download | qpid-python-c58b28b9b38a72e47f5b24a2b4e565c842e0858c.tar.gz |
Merge from trunk
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/QPID-6262-JavaBrokerNIO@1666204 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-x | qpid/bin/release.sh | 319 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/PersistableQueue.h | 7 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/amqp/Connection.cpp | 10 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/broker/amqp/Session.cpp | 4 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/management/ManagementAgent.cpp | 4 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp | 7 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp | 4 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h | 2 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/messaging/amqp/SenderContext.h | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/Variant.cpp | 10 | ||||
-rw-r--r-- | qpid/cpp/src/tests/brokertest.py | 19 | ||||
-rw-r--r-- | qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml | 23 |
12 files changed, 58 insertions, 353 deletions
diff --git a/qpid/bin/release.sh b/qpid/bin/release.sh deleted file mode 100755 index 69125a89e5..0000000000 --- a/qpid/bin/release.sh +++ /dev/null @@ -1,319 +0,0 @@ -#!/bin/sh -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# Script to pull together an Apache Release -# - -usage() -{ - echo "Usage: release.sh <svn-path> <svn-revision> <version> [options]" - echo - echo "Options: Default : --prepare --svn --all --sign" - echo "--help |-h : Show this help" - echo "--prepare : Export specified tree from source control" - echo "--svn : Export from svn" - echo "--git : Export from git repository with svn metadata" - echo "--clean-all : Remove build artefacts and downloaded svn tree" - echo "--clean : Remove built artefacts" - echo "--all |-a : Generate all artefacts" - echo "--source|-e : Generate the source artefact" - echo "--cpp |-c : Generate the CPP artefacts" - echo "--java |-j : Generate the java artefacts" - echo "--perl |-r : Generate the Perl artefacts" - echo "--python|-p : Generate the python artefacts" - echo "--wcf |-w : Generate the WCF artefacts" - echo "--tools |-t : Generate the tools artefacts" - echo "--qmf |-q : Generate the QMF artefacts" - echo "--source|-e : Generate the source artefact" - echo "--sign |-s : Sign generated artefacts" - echo "--upload|-u : Upload the artifacts directory to people.apache.org as qpid-\$VER" - echo -} - -all_artefacts() -{ - echo ALL_ARTEFACTS - - CPP="CPP" - JAVA="JAVA" - PERL="PERL" - PYTHON="PYTHON" - WCF="WCF" - TOOLS="TOOLS" - QMF="QMF" - SOURCE="SOURCE" -} - -REPO="SVN" -for arg in $* ; do - case $arg in - --help|-h) - HELP="HELP" - ;; - --prepare) - PREPARE="PREPARE" - ;; - --svn) - REPO="SVN" - ;; - --git) - REPO="GIT" - ;; - --clean-all) - CLEAN="CLEAN" - CLEAN_ARTIFACTS="CLEAN_ARTIFACTS" - ;; - --clean) - CLEAN_ARTIFACTS="CLEAN_ARTIFACTS" - ;; - --sign|-s) - SIGN="SIGN" - ;; - --all|-a) - all_artefacts - ;; - --cpp|-c) - CPP="CPP" - ;; - --java|-j) - JAVA="JAVA" - ;; - --perl|-r) - PERL="PERL" - ;; - --python|-p) - PYTHON="PYTHON" - ;; - --wcf|-w) - WCF="WCF" - ;; - --tools|-t) - TOOLS="TOOLS" - ;; - --qmf|-q) - QMF="QMF" - ;; - --source|-e) - SOURCE="SOURCE" - ;; - --upload|-u) - UPLOAD="UPLOAD" - ;; - *) - if [ -z "$SVN" ] ; then - SVN=$arg - continue - fi - - if [ -z "$REV" ] ; then - REV=$arg - continue - fi - - if [ -z "$VER" ] ; then - VER=$arg - continue - fi - ;; - esac -done - -if [ -n "${HELP}" ] ; then - usage - exit 0 -fi - -if [ -z "$SVN" -o -z "$REV" -o -z "$VER" ]; then - echo "Usage: release.sh <svn-path> <svn-revision> <version>" - exit 1 -fi - -echo SVN:$SVN -echo REV:$REV -echo VER:$VER - -# If nothing is specified then do it all -if [ -z "${CLEAN}${PREPARE}${CPP}${JAVA}${PERL}${PYTHON}${QMF}${TOOLS}${WCF}${SOURCE}${SIGN}${UPLOAD}" ] ; then - PREPARE="PREPARE" - all_artefacts - SIGN="SIGN" -fi - -set -xe - -if [ "CLEAN" == "$CLEAN" ] ; then - rm -rf qpid-${VER} -fi - -if [ "CLEAN_ARTIFACTS" == "$CLEAN_ARTIFACTS" ] ; then - rm -rf artifacts -fi - -if [ "PREPARE" == "$PREPARE" ] ; then - mkdir artifacts - case ${REPO} in - SVN) - URL=https://svn.apache.org/repos/asf/qpid/${SVN} - svn export -r ${REV} ${URL} qpid-${VER} - echo ${URL} ${REV} > artifacts/qpid-${VER}.svnversion - ;; - GIT) - URL=${SVN} - GITREV=$(GIT_DIR=${URL} git svn find-rev r${REV}) - git archive --remote=${URL} ${GITREV} | tar xvf - - mv qpid qpid-${VER} - echo ${REV} > artifacts/qpid-${VER}.svnversion - ;; - esac -fi - -if [ "SOURCE" == "$SOURCE" ] ; then - tar -czf artifacts/qpid-${VER}.tar.gz qpid-${VER} -fi - -if [ "PERL" == "$PERL" ]; then - mkdir qpid-${VER}/perl-qpid-${VER} - cp qpid-${VER}/cpp/bindings/qpid/perl/perl.i \ - qpid-${VER}/cpp/bindings/qpid/perl/LICENSE \ - qpid-${VER}/cpp/bindings/qpid/perl/Makefile.PL \ - qpid-${VER}/cpp/bindings/qpid/perl/t/*.t \ - qpid-${VER}/perl-qpid-${VER} - cp -r qpid-${VER}/cpp/bindings/qpid/perl/lib \ - qpid-${VER}/perl-qpid-${VER} - mkdir qpid-${VER}/perl-qpid-${VER}/examples - cp qpid-${VER}/cpp/bindings/qpid/examples/perl/* \ - qpid-${VER}/perl-qpid-${VER}/examples - pushd qpid-${VER} - tar -czf ../artifacts/perl-qpid-${VER}.tar.gz perl-qpid-${VER} - popd -fi - -if [ "PYTHON" == "$PYTHON" ] ; then - tar -czf artifacts/qpid-python-${VER}.tar.gz qpid-${VER}/python qpid-${VER}/specs - - # create the swigged python sources - mkdir qpid-${VER}/python-qpid_messaging-${VER} - mkdir qpid-${VER}/python-qpid_messaging-${VER}/examples - cp qpid-${VER}/cpp/bindings/qpid/python/python.i \ - qpid-${VER}/cpp/bindings/qpid/python/LICENSE \ - qpid-${VER}/cpp/bindings/qpid/python/README \ - qpid-${VER}/cpp/bindings/qpid/python/ChangeLog \ - qpid-${VER}/cpp/bindings/qpid/python/extra_dist/CMakeLists.txt \ - qpid-${VER}/python-qpid_messaging-${VER} - cp qpid-${VER}/cpp/bindings/qpid/examples/python/* \ - qpid-${VER}/python-qpid_messaging-${VER}/examples - pushd qpid-${VER} - tar -czf ../artifacts/python-qpid_messaging-${VER}.tar.gz \ - python-qpid_messaging-${VER} - popd -fi - -if [ "WCF" == "$WCF" ] ; then - zip -rq artifacts/qpid-wcf-${VER}.zip qpid-${VER}/wcf -fi - -if [ "CPP" == "$CPP" ] ; then - cp -a qpid-${VER}/cpp qpid-cpp-${VER} - tar -cvzf artifacts/qpid-cpp-${VER}.tar.gz qpid-cpp-${VER} - rm -rf qpid-cpp-${VER} -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 clean 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 -Dsvnversion.output=${REV} -Doptional=true - ant release-mvn -Dsvnversion.output=${REV} -Doptional=true -Dmaven.snapshot=false - 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/amqp-1-0-client-jms/release/*.tar.gz artifacts/qpid-java-amqp-1-0-client-jms-${VER}.tar.gz - - # copy the Maven artifacts - cp -a qpid-${VER}/java/jca/release/maven artifacts/ - cp -a qpid-${VER}/java/amqp-1-0-client/release/maven artifacts/ - cp -a qpid-${VER}/java/amqp-1-0-client-jms/release/maven artifacts/ - cp -a qpid-${VER}/java/amqp-1-0-client-websocket/release/maven artifacts/ - cp -a qpid-${VER}/java/amqp-1-0-common/release/maven artifacts/ - cp -a qpid-${VER}/java/client/release/maven artifacts/ - cp -a qpid-${VER}/java/common/release/maven artifacts/ - cp -a qpid-${VER}/java/broker/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-core/release/maven artifacts/ - cp -a qpid-${VER}/java/bdbstore/release/maven artifacts/ - cp -a qpid-${VER}/java/management/common/release/maven artifacts/ - cp -a qpid-${VER}/java/amqp-1-0-common/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/access-control/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/amqp-0-8-protocol/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/amqp-0-10-protocol/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/amqp-1-0-protocol/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/derby-store/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/jdbc-provider-bone/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/jdbc-store/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/management-http/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/management-jmx/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/memory-store/release/maven artifacts/ - cp -a qpid-${VER}/java/broker-plugins/websocket/release/maven artifacts/ - cp -a qpid-${VER}/java/bdbstore/jmx/release/maven artifacts/ -fi - -if [ "TOOLS" = "$TOOLS" ] ; then - pushd qpid-${VER}/tools - - python setup.py sdist - - popd - - cp qpid-${VER}/tools/dist/*.tar.gz artifacts/qpid-tools-${VER}.tar.gz -fi - -if [ "QMF" = "$QMF" ]; then - pushd qpid-${VER}/extras/qmf - - python setup.py sdist - - popd - - cp qpid-${VER}/extras/qmf/dist/*.tar.gz artifacts/qpid-qmf-${VER}.tar.gz -fi - -if [ "SIGN" == "$SIGN" ] ; then - pushd artifacts - sha1sum *.zip *.gz *.svnversion > SHA1SUM - if [ ! -z $SIGNING_KEY ] ; then - KEYOPTION="--default-key $SIGNING_KEY" - fi - for i in `find . | egrep 'jar$|rar$|pom$|gz$|zip$|svnversion$|SHA1SUM'`; do gpg --sign --armor --detach $KEYOPTION $i; done; - popd -fi - -if [ "UPLOAD" == "$UPLOAD" ] ; then - scp -r artifacts people.apache.org:qpid-${VER} -fi diff --git a/qpid/cpp/src/qpid/broker/PersistableQueue.h b/qpid/cpp/src/qpid/broker/PersistableQueue.h index 655d26bc74..6733163084 100644 --- a/qpid/cpp/src/qpid/broker/PersistableQueue.h +++ b/qpid/cpp/src/qpid/broker/PersistableQueue.h @@ -25,7 +25,6 @@ #include <string> #include "qpid/broker/Persistable.h" #include "qpid/management/Manageable.h" -#include <boost/shared_ptr.hpp> namespace qpid { namespace broker { @@ -51,12 +50,12 @@ public: class PersistableQueue : public Persistable { public: - typedef boost::shared_ptr<PersistableQueue> shared_ptr; - virtual const std::string& getName() const = 0; virtual ~PersistableQueue() { - if (externalQueueStore) + if (externalQueueStore) { delete externalQueueStore; + externalQueueStore = 0; + } }; virtual void setExternalQueueStore(ExternalQueueStore* inst) = 0; diff --git a/qpid/cpp/src/qpid/broker/amqp/Connection.cpp b/qpid/cpp/src/qpid/broker/amqp/Connection.cpp index e315e55843..5593f755e5 100644 --- a/qpid/cpp/src/qpid/broker/amqp/Connection.cpp +++ b/qpid/cpp/src/qpid/broker/amqp/Connection.cpp @@ -453,16 +453,6 @@ void Connection::process() } #endif // !HAVE_PROTON_EVENTS } -namespace { -std::string convert(pn_delivery_tag_t in) -{ -#ifdef NO_PROTON_DELIVERY_TAG_T - return std::string(in.start, in.size); -#else - return std::string(in.bytes, in.size); -#endif -} -} void Connection::processDeliveries() { #ifdef HAVE_PROTON_EVENTS diff --git a/qpid/cpp/src/qpid/broker/amqp/Session.cpp b/qpid/cpp/src/qpid/broker/amqp/Session.cpp index 3b65e6a64d..9cd6aae26f 100644 --- a/qpid/cpp/src/qpid/broker/amqp/Session.cpp +++ b/qpid/cpp/src/qpid/broker/amqp/Session.cpp @@ -835,7 +835,7 @@ void Session::abort() tx.dischargeComplete(); tx.buffer->rollback(); txAborted(); - tx.buffer.reset(); + tx.buffer = boost::intrusive_ptr<TxBuffer>(); QPID_LOG(debug, "Transaction " << tx.id << " rolled back"); } } @@ -848,7 +848,7 @@ void Session::committed(bool sync) if (tx.buffer.get()) { tx.buffer->endCommit(&connection.getBroker().getStore()); txCommitted(); - tx.buffer.reset(); + tx.buffer = boost::intrusive_ptr<TxBuffer>(); QPID_LOG(debug, "Transaction " << tx.id << " comitted"); } else { throw Exception(qpid::amqp::error_conditions::transaction::ROLLBACK, "tranaction vanished during async commit"); diff --git a/qpid/cpp/src/qpid/management/ManagementAgent.cpp b/qpid/cpp/src/qpid/management/ManagementAgent.cpp index 1eab6f622b..516babce61 100644 --- a/qpid/cpp/src/qpid/management/ManagementAgent.cpp +++ b/qpid/cpp/src/qpid/management/ManagementAgent.cpp @@ -706,8 +706,8 @@ void ManagementAgent::moveNewObjects() void ManagementAgent::periodicProcessing (void) { #define HEADROOM 4096 - debugSnapshot("Management agent periodic processing"); sys::Mutex::ScopedLock lock (userLock); + debugSnapshot("Management agent periodic processing"); string routingKey; string sBuf; @@ -2704,6 +2704,8 @@ string ManagementAgent::summarizeAgents() { void ManagementAgent::debugSnapshot(const char* title) { + sys::Mutex::ScopedLock lock(addLock); + sys::Mutex::ScopedLock objLock (objectLock); QPID_LOG(debug, title << ": management snapshot: " << packages.size() << " packages, " << summarizeMap("objects", managementObjects) diff --git a/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp b/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp index 2106e21686..8033cc5dee 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp @@ -138,13 +138,6 @@ uint64_t getFilterDescriptor(const std::string& key) { return hasWildcards(key) ? qpid::amqp::filters::LEGACY_TOPIC_FILTER_CODE : qpid::amqp::filters::LEGACY_DIRECT_FILTER_CODE; } -bool contains(const Variant::List& list, const std::string& item) -{ - for (Variant::List::const_iterator i = list.begin(); i != list.end(); ++i) { - if (*i == item) return true; - } - return false; -} bool test(const Variant::Map& options, const std::string& name) { diff --git a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp index d4a7b60e3c..0c516311da 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp @@ -230,7 +230,7 @@ void ConnectionContext::close() } if (ticker) { ticker->cancel(); - ticker.reset(); + ticker = boost::intrusive_ptr<qpid::sys::TimerTask>(); } } @@ -1236,7 +1236,7 @@ void ConnectionContext::startTxSession(boost::shared_ptr<SessionContext> session QPID_LOG(debug, id << " attaching transaction for " << session->getName()); boost::shared_ptr<Transaction> tx(new Transaction(session->session)); session->transaction = tx; - attach(session, tx); + attach(session, boost::shared_ptr<SenderContext>(tx)); tx->declare(boost::bind(&ConnectionContext::send, this, _1, _2, _3, _4, _5), session); } catch (const Exception& e) { throw TransactionError(Msg() << "Cannot start transaction: " << e.what()); diff --git a/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h b/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h index 2b4e8e1986..dd1352aecb 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h +++ b/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h @@ -46,7 +46,7 @@ class ReceiverContext { public: ReceiverContext(pn_session_t* session, const std::string& name, const qpid::messaging::Address& source); - ~ReceiverContext(); + virtual ~ReceiverContext(); void reset(pn_session_t* session); void setCapacity(uint32_t); uint32_t getCapacity(); diff --git a/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h b/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h index 4d3c4bee79..467a8e0d3d 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h +++ b/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h @@ -76,7 +76,7 @@ class SenderContext const qpid::messaging::Address& target, bool setToOnSend, const CoordinatorPtr& transaction = CoordinatorPtr()); - ~SenderContext(); + virtual ~SenderContext(); virtual void reset(pn_session_t* session); virtual void close(); diff --git a/qpid/cpp/src/tests/Variant.cpp b/qpid/cpp/src/tests/Variant.cpp index d6605f9fe5..5ae7fc89eb 100644 --- a/qpid/cpp/src/tests/Variant.cpp +++ b/qpid/cpp/src/tests/Variant.cpp @@ -815,12 +815,16 @@ QPID_AUTO_TEST_CASE(described) BOOST_CHECK(!a.isDescribed()); a.getDescriptors().push_back("foo"); BOOST_CHECK(a.isDescribed()); - BOOST_CHECK_EQUAL(a.getDescriptors(), list_of<Variant>("foo")); + BOOST_CHECK_EQUAL(a.getDescriptors().size(), 1U); + BOOST_CHECK_EQUAL(a.getDescriptors().front(), Variant("foo")); a = 42; BOOST_CHECK(a.isDescribed()); - BOOST_CHECK_EQUAL(a.getDescriptors(), list_of<Variant>("foo")); + BOOST_CHECK_EQUAL(a.getDescriptors().size(), 1U); + BOOST_CHECK_EQUAL(a.getDescriptors().front(), Variant("foo")); a.getDescriptors().push_back(33); - BOOST_CHECK_EQUAL(a.getDescriptors(), list_of<Variant>("foo")(33)); + BOOST_CHECK_EQUAL(a.getDescriptors().size(), 2U); + BOOST_CHECK_EQUAL(a.getDescriptors().front(), Variant("foo")); + BOOST_CHECK_EQUAL(*(++a.getDescriptors().begin()), Variant(33)); a.getDescriptors().clear(); BOOST_CHECK(!a.isDescribed()); } diff --git a/qpid/cpp/src/tests/brokertest.py b/qpid/cpp/src/tests/brokertest.py index 2566bc527d..6fae88092b 100644 --- a/qpid/cpp/src/tests/brokertest.py +++ b/qpid/cpp/src/tests/brokertest.py @@ -21,7 +21,6 @@ import os, signal, string, tempfile, subprocess, socket, threading, time, imp, re import qpid, traceback, signal -import proton from qpid import connection, util from qpid.compat import format_exc from unittest import TestCase @@ -493,7 +492,16 @@ class BrokerTest(TestCase): test_store_lib = os.getenv("TEST_STORE_LIB") rootdir = os.getcwd() - PN_VERSION = (proton.VERSION_MAJOR, proton.VERSION_MINOR) + try: + import proton + PN_VERSION = (proton.VERSION_MAJOR, proton.VERSION_MINOR) + except ImportError: + # proton not on path, can't determine version + PN_VERSION = (0, 0) + except AttributeError: + # prior to 0.8 proton did not expose version info + PN_VERSION = (0, 7) + PN_TX_VERSION = (0, 9) amqp_tx_supported = PN_VERSION >= PN_TX_VERSION @@ -501,7 +509,12 @@ class BrokerTest(TestCase): @classmethod def amqp_tx_warning(cls): if not cls.amqp_tx_supported: - print "WARNING: Cannot test transactions over AMQP 1.0, proton version %s.%s < %s.%s" % (cls.PN_VERSION + cls.PN_TX_VERSION) + if cls.PN_VERSION == (0, 0): + print "WARNING: Cannot test transactions over AMQP 1.0, proton not on path so version could not be determined" + elif cls.PN_VERSION == (0, 7): + print "WARNING: Cannot test transactions over AMQP 1.0, proton version is 0.7 or less, %s.%s required" % cls.PN_TX_VERSION + else: + print "WARNING: Cannot test transactions over AMQP 1.0, proton version %s.%s < %s.%s" % (cls.PN_VERSION + cls.PN_TX_VERSION) return False return True diff --git a/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml b/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml index b750c8e19c..60af03476e 100644 --- a/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml +++ b/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml @@ -326,6 +326,29 @@ amqp://guest:guest@clientid/?brokerlist='localhost:5671?key_store='/path/to/app1 <emphasis>Session#SESSION_TRANSACTED</emphasis> ) or received messages are acknowledged (for <emphasis>Session#CLIENT_ACKNOWLEDGE</emphasis>).</para> </note> + <para> + Settings maxprefetch to 0 ( either globally via JVM system property + <link linkend="JMS-Client-0-8-System-Properties-Maxprefetch" ><literal>max_prefetch</literal></link> + or on a connection level as a connection option + <link linkend="JMS-Client-0-8-Connection-URL-ConnectionOptions-Maxprefetch"><literal>maxprefetch</literal></link> ) + switches off the pre-fetching functionality. With maxprefetch=0 messages are fetched one by one without caching on the client. + </para> + <note> + <para> Setting maxprefetch to 0 is recommended in Spring-JMS based applications whenever + <emphasis>DefaultMassgeListenerContainer</emphasis> is configured with a + <emphasis>CachingConnectionFactory</emphasis> that has <emphasis>cacheLevel</emphasis> + set to either <emphasis>CACHE_CONSUMER</emphasis> or <emphasis>CACHE_SESSION</emphasis>. + In these configurations the Qpid JMS <emphasis>Session</emphasis> objects remain open in + Spring's dynamically scaled pools. If maxprefetch is not 0, any prefetched messages held + by the <emphasis>Session</emphasis> and any new ones subsequently sent to it (in the + background until prefetch is reached) will be effectively by 'stuck' (unavailable to the + application) until Spring decides to utilise the cached Session again. This can give the + impression that message delivery has stopped even though messages remain of the queue. + Setting maxprefetch to 0 prevents this problem from occurring.</para> + <para> If using maxprefetch > 0 <emphasis>SingleConnectionFactory</emphasis> must be + used. SingleConnectionFactory does not have the same session/consumer caching behaviour so + does not exhibit the same problem. </para> + </note> </section> <section id="JMS-Client-0-8-Client-Understanding-Session-TemporaryQueues"> <title>TemporaryQueues</title> |