You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2015/03/12 15:16:16 UTC
svn commit: r1666204 - in /qpid/branches/QPID-6262-JavaBrokerNIO: ./ qpid/
qpid/bin/ qpid/cpp/src/ qpid/cpp/src/qpid/broker/
qpid/cpp/src/qpid/broker/amqp/ qpid/cpp/src/qpid/management/
qpid/cpp/src/qpid/messaging/amqp/ qpid/cpp/src/tests/ qpid/doc/boo...
Author: kwall
Date: Thu Mar 12 14:16:16 2015
New Revision: 1666204
URL: http://svn.apache.org/r1666204
Log:
Merge from trunk
Removed:
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/bin/release.sh
Modified:
qpid/branches/QPID-6262-JavaBrokerNIO/ (props changed)
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/ (props changed)
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/ (props changed)
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/ (props changed)
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/PersistableQueue.h
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Connection.cpp
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Session.cpp
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/management/ManagementAgent.cpp (contents, props changed)
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/ (props changed)
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/Variant.cpp
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/brokertest.py
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml
Propchange: qpid/branches/QPID-6262-JavaBrokerNIO/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 14:16:16 2015
@@ -3,4 +3,4 @@
/qpid/branches/java-broker-bdb-ha2:1576683-1583556
/qpid/branches/java-network-refactor:805429-825319
/qpid/branches/mcpierce-QPID-4719:1477004-1477093
-/qpid/trunk:1643238-1663731
+/qpid/trunk:1643238-1666113
Propchange: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 14:16:16 2015
@@ -6,4 +6,4 @@
/qpid/branches/mcpierce-QPID-4719/qpid:1477004-1477093
/qpid/branches/qpid-2935/qpid:1061302-1072333
/qpid/branches/qpid-3346/qpid:1144319-1179855
-/qpid/trunk/qpid:1643238-1663687
+/qpid/trunk/qpid:1643238-1666113
Propchange: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 14:16:16 2015
@@ -6,4 +6,4 @@
/qpid/branches/java-network-refactor/qpid/cpp/src:805429-825319
/qpid/branches/qpid-2935/qpid/cpp/src:1061302-1072333
/qpid/branches/qpid-3346/qpid/cpp/src:1144319-1179855
-/qpid/trunk/qpid/cpp/src:1643238-1663687
+/qpid/trunk/qpid/cpp/src:1643238-1666113
Propchange: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 14:16:16 2015
@@ -7,4 +7,4 @@
/qpid/branches/qpid-2935/qpid/cpp/src/qpid/broker:1061302-1072333
/qpid/branches/qpid-3346/qpid/cpp/src/qpid/broker:1144319-1179855
/qpid/branches/qpid-3890/qpid/cpp/src/qpid/broker:1299027-1303795
-/qpid/trunk/qpid/cpp/src/qpid/broker:1643238-1663687
+/qpid/trunk/qpid/cpp/src/qpid/broker:1643238-1666113
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/PersistableQueue.h
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/PersistableQueue.h?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/PersistableQueue.h (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/PersistableQueue.h Thu Mar 12 14:16:16 2015
@@ -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;
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Connection.cpp?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Connection.cpp (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Connection.cpp Thu Mar 12 14:16:16 2015
@@ -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
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Session.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Session.cpp?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Session.cpp (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/broker/amqp/Session.cpp Thu Mar 12 14:16:16 2015
@@ -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");
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/management/ManagementAgent.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/management/ManagementAgent.cpp?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/management/ManagementAgent.cpp (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/management/ManagementAgent.cpp Thu Mar 12 14:16:16 2015
@@ -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)
Propchange: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/management/ManagementAgent.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 14:16:16 2015
@@ -1 +1,2 @@
/qpid/branches/qpid-2935/qpid/cpp/src/qpid/management/ManagementAgent.cpp:1061302-1072333
+/qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp:1643238-1666113
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp Thu Mar 12 14:16:16 2015
@@ -138,13 +138,6 @@ uint64_t getFilterDescriptor(const std::
{
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)
{
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp Thu Mar 12 14:16:16 2015
@@ -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(b
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());
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h Thu Mar 12 14:16:16 2015
@@ -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();
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h Thu Mar 12 14:16:16 2015
@@ -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();
Propchange: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 14:16:16 2015
@@ -7,4 +7,4 @@
/qpid/branches/java-network-refactor/qpid/cpp/src/tests:805429-825319
/qpid/branches/qpid-2935/qpid/cpp/src/tests:1061302-1072333
/qpid/branches/qpid-3346/qpid/cpp/src/tests:1144319-1179855
-/qpid/trunk/qpid/cpp/src/tests:1643238-1663687
+/qpid/trunk/qpid/cpp/src/tests:1643238-1666113
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/Variant.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/Variant.cpp?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/Variant.cpp (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/Variant.cpp Thu Mar 12 14:16:16 2015
@@ -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());
}
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/brokertest.py
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/brokertest.py?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/brokertest.py (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/cpp/src/tests/brokertest.py Thu Mar 12 14:16:16 2015
@@ -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
Modified: qpid/branches/QPID-6262-JavaBrokerNIO/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml?rev=1666204&r1=1666203&r2=1666204&view=diff
==============================================================================
--- qpid/branches/QPID-6262-JavaBrokerNIO/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml (original)
+++ qpid/branches/QPID-6262-JavaBrokerNIO/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml Thu Mar 12 14:16:16 2015
@@ -326,6 +326,29 @@ amqp://guest:guest@clientid/?brokerlist=
<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>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org