You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2013/02/18 11:18:29 UTC
svn commit: r1447183 [4/7] - in /qpid/branches/java-broker-config-qpid-4390:
./ qpid/ qpid/bin/ qpid/cpp/bindings/ qpid/cpp/bindings/qpid/dotnet/
qpid/cpp/bindings/qpid/examples/perl/ qpid/cpp/bindings/qpid/perl/
qpid/cpp/bindings/qpid/perl/lib/ qpid/c...
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/ha/StandAlone.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/ha/StandAlone.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/ha/StandAlone.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/ha/StandAlone.h Mon Feb 18 10:18:24 2013
@@ -22,7 +22,7 @@
*
*/
namespace qpid {
-class Url;
+struct Url;
namespace ha {
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/log/Logger.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/log/Logger.cpp?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/log/Logger.cpp (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/log/Logger.cpp Mon Feb 18 10:18:24 2013
@@ -177,4 +177,20 @@ void Logger::reconfigure(const std::vect
void Logger::setPrefix(const std::string& p) { prefix = p; }
+
+bool Logger::getHiresTimestamp()
+{
+ return flags & HIRES;
+}
+
+
+void Logger::setHiresTimestamp(bool setting)
+{
+ ScopedLock l(lock);
+ if (setting)
+ flags |= HIRES;
+ else
+ flags &= ~HIRES;
+}
+
}} // namespace qpid::log
Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/management/ManagementAgent.cpp
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp:r1438054-1446845
Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/management/ManagementAgent.h
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.h:r1438054-1446845
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp Mon Feb 18 10:18:24 2013
@@ -21,6 +21,7 @@
#include "ProtocolRegistry.h"
#include "qpid/Exception.h"
#include "qpid/client/amqp0_10/ConnectionImpl.h"
+#include "qpid/client/LoadPlugins.h"
#include <map>
using qpid::types::Variant;
@@ -53,6 +54,7 @@ bool extract(const std::string& key, Var
ConnectionImpl* ProtocolRegistry::create(const std::string& url, const Variant::Map& options)
{
+ qpid::client::theModuleLoader();//ensure modules are loaded
Variant name;
Variant::Map stripped;
if (extract("protocol", name, options, stripped)) {
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/amqp/SslTransport.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/amqp/SslTransport.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/amqp/SslTransport.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/amqp/SslTransport.h Mon Feb 18 10:18:24 2013
@@ -49,7 +49,7 @@ class SslTransport : public Transport
void activateOutput();
void abort();
void close();
- void giveReadCredit(int32_t) {}
+
private:
qpid::sys::ssl::SslSocket socket;
TransportContext& context;
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/amqp/TcpTransport.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/amqp/TcpTransport.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/amqp/TcpTransport.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/messaging/amqp/TcpTransport.h Mon Feb 18 10:18:24 2013
@@ -49,7 +49,6 @@ class TcpTransport : public Transport
void activateOutput();
void abort();
void close();
- void giveReadCredit(int32_t) {}
private:
boost::scoped_ptr<qpid::sys::Socket> socket;
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AggregateOutput.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AggregateOutput.cpp?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AggregateOutput.cpp (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AggregateOutput.cpp Mon Feb 18 10:18:24 2013
@@ -32,8 +32,6 @@ void AggregateOutput::abort() { control.
void AggregateOutput::activateOutput() { control.activateOutput(); }
-void AggregateOutput::giveReadCredit(int32_t credit) { control.giveReadCredit(credit); }
-
namespace {
// Clear the busy flag and notify waiting threads in destructor.
struct ScopedBusy {
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AggregateOutput.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AggregateOutput.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AggregateOutput.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AggregateOutput.h Mon Feb 18 10:18:24 2013
@@ -59,7 +59,6 @@ class QPID_COMMON_CLASS_EXTERN Aggregate
// These may be called concurrently with any function.
QPID_COMMON_EXTERN void abort();
QPID_COMMON_EXTERN void activateOutput();
- QPID_COMMON_EXTERN void giveReadCredit(int32_t);
QPID_COMMON_EXTERN void addOutputTask(OutputTask* t);
// These functions must not be called concurrently with each other.
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIO.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIO.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIO.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIO.h Mon Feb 18 10:18:24 2013
@@ -159,8 +159,6 @@ public:
virtual void notifyPendingWrite() = 0;
virtual void queueWriteClose() = 0;
virtual bool writeQueueEmpty() = 0;
- virtual void startReading() = 0;
- virtual void stopReading() = 0;
virtual void requestCallback(RequestCallback) = 0;
virtual BufferBase* getQueuedBuffer() = 0;
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp Mon Feb 18 10:18:24 2013
@@ -59,8 +59,7 @@ AsynchIOHandler::AsynchIOHandler(const s
reads(0),
readError(false),
isClient(isClient0),
- nodict(nodict0),
- readCredit(InfiniteCredit)
+ nodict(nodict0)
{}
AsynchIOHandler::~AsynchIOHandler() {
@@ -98,27 +97,13 @@ void AsynchIOHandler::abort() {
if (!readError) {
aio->requestCallback(boost::bind(&AsynchIOHandler::eof, this, _1));
}
+ aio->queueWriteClose();
}
void AsynchIOHandler::activateOutput() {
aio->notifyPendingWrite();
}
-// Input side
-void AsynchIOHandler::giveReadCredit(int32_t credit) {
- // Check whether we started in the don't about credit state
- if (readCredit.boolCompareAndSwap(InfiniteCredit, credit))
- return;
- // TODO In theory should be able to use an atomic operation before taking the lock
- // but in practice there seems to be an unexplained race in that case
- ScopedLock<Mutex> l(creditLock);
- if (readCredit.fetchAndAdd(credit) != 0)
- return;
- assert(readCredit.get() >= 0);
- if (readCredit.get() != 0)
- aio->startReading();
-}
-
namespace {
SecuritySettings getSecuritySettings(AsynchIO* aio, bool nodict)
{
@@ -133,26 +118,6 @@ void AsynchIOHandler::readbuff(AsynchIO&
return;
}
- // Check here for read credit
- if (readCredit.get() != InfiniteCredit) {
- if (readCredit.get() == 0) {
- // FIXME aconway 2009-10-01: Workaround to avoid "false wakeups".
- // readbuff is sometimes called with no credit.
- // This should be fixed somewhere else to avoid such calls.
- aio->unread(buff);
- return;
- }
- // TODO In theory should be able to use an atomic operation before taking the lock
- // but in practice there seems to be an unexplained race in that case
- ScopedLock<Mutex> l(creditLock);
- if (--readCredit == 0) {
- assert(readCredit.get() >= 0);
- if (readCredit.get() == 0) {
- aio->stopReading();
- }
- }
- }
-
++reads;
size_t decoded = 0;
if (codec) { // Already initiated
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIOHandler.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIOHandler.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIOHandler.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/AsynchIOHandler.h Mon Feb 18 10:18:24 2013
@@ -52,9 +52,6 @@ class AsynchIOHandler : public OutputCon
bool readError;
bool isClient;
bool nodict;
- AtomicValue<int32_t> readCredit;
- static const int32_t InfiniteCredit = -1;
- Mutex creditLock;
boost::intrusive_ptr<sys::TimerTask> timeoutTimerTask;
void write(const framing::ProtocolInitiation&);
@@ -67,7 +64,6 @@ class AsynchIOHandler : public OutputCon
// Output side
QPID_COMMON_EXTERN void abort();
QPID_COMMON_EXTERN void activateOutput();
- QPID_COMMON_EXTERN void giveReadCredit(int32_t credit);
// Input side
QPID_COMMON_EXTERN void readbuff(AsynchIO& aio, AsynchIOBufferBase* buff);
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/ConnectionOutputHandlerPtr.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/ConnectionOutputHandlerPtr.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/ConnectionOutputHandlerPtr.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/ConnectionOutputHandlerPtr.h Mon Feb 18 10:18:24 2013
@@ -45,7 +45,6 @@ class ConnectionOutputHandlerPtr : publi
size_t getBuffered() const { return next->getBuffered(); }
void abort() { next->abort(); }
void activateOutput() { next->activateOutput(); }
- void giveReadCredit(int32_t credit) { next->giveReadCredit(credit); }
void send(framing::AMQFrame& f) { next->send(f); }
private:
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/OutputControl.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/OutputControl.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/OutputControl.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/OutputControl.h Mon Feb 18 10:18:24 2013
@@ -33,7 +33,6 @@ namespace sys {
virtual ~OutputControl() {}
virtual void abort() = 0;
virtual void activateOutput() = 0;
- virtual void giveReadCredit(int32_t credit) = 0;
};
}
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/RdmaIOPlugin.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/RdmaIOPlugin.cpp?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/RdmaIOPlugin.cpp (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/RdmaIOPlugin.cpp Mon Feb 18 10:18:24 2013
@@ -68,7 +68,6 @@ class RdmaIOHandler : public OutputContr
void close();
void abort();
void activateOutput();
- void giveReadCredit(int32_t credit);
void initProtocolOut();
// Input side
@@ -200,10 +199,6 @@ void RdmaIOHandler::full(Rdma::AsynchIO&
QPID_LOG(debug, "Rdma: buffer full [" << identifier << "]");
}
-// TODO: Dummy implementation of read throttling
-void RdmaIOHandler::giveReadCredit(int32_t) {
-}
-
// The logic here is subtly different from TCP as RDMA is message oriented
// so we define that an RDMA message is a frame - in this case there is no putting back
// of any message remainder - there shouldn't be any. And what we read here can't be
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp Mon Feb 18 10:18:24 2013
@@ -268,8 +268,6 @@ public:
virtual void notifyPendingWrite();
virtual void queueWriteClose();
virtual bool writeQueueEmpty();
- virtual void startReading();
- virtual void stopReading();
virtual void requestCallback(RequestCallback);
virtual BufferBase* getQueuedBuffer();
virtual SecuritySettings getSecuritySettings();
@@ -304,13 +302,6 @@ private:
* thread processing this handle.
*/
volatile bool writePending;
- /**
- * This records whether we've been reading is flow controlled:
- * it's safe as a simple boolean as the only way to be stopped
- * is in calls only allowed in the callback context, the only calls
- * checking it are also in calls only allowed in callback context.
- */
- volatile bool readingStopped;
};
AsynchIO::AsynchIO(const Socket& s,
@@ -329,8 +320,7 @@ AsynchIO::AsynchIO(const Socket& s,
idleCallback(iCb),
socket(s),
queuedClose(false),
- writePending(false),
- readingStopped(false) {
+ writePending(false) {
s.setNonblocking();
}
@@ -366,7 +356,7 @@ void AsynchIO::queueReadBuffer(BufferBas
bool queueWasEmpty = bufferQueue.empty();
bufferQueue.push_back(buff);
- if (queueWasEmpty && !readingStopped)
+ if (queueWasEmpty)
DispatchHandle::rewatchRead();
}
@@ -376,7 +366,7 @@ void AsynchIO::unread(BufferBase* buff)
bool queueWasEmpty = bufferQueue.empty();
bufferQueue.push_front(buff);
- if (queueWasEmpty && !readingStopped)
+ if (queueWasEmpty)
DispatchHandle::rewatchRead();
}
@@ -408,17 +398,6 @@ bool AsynchIO::writeQueueEmpty() {
return writeQueue.empty();
}
-// This can happen outside the callback context
-void AsynchIO::startReading() {
- readingStopped = false;
- DispatchHandle::rewatchRead();
-}
-
-void AsynchIO::stopReading() {
- readingStopped = true;
- DispatchHandle::unwatchRead();
-}
-
void AsynchIO::requestCallback(RequestCallback callback) {
// TODO creating a function object every time isn't all that
// efficient - if this becomes heavily used do something better (what?)
@@ -451,11 +430,6 @@ AsynchIO::BufferBase* AsynchIO::getQueue
* to put it in and reading is not stopped by flow control.
*/
void AsynchIO::readable(DispatchHandle& h) {
- if (readingStopped) {
- // We have been flow controlled.
- QPID_PROBE1(asynchio_read_flowcontrolled, &h);
- return;
- }
AbsTime readStartTime = AbsTime::now();
size_t total = 0;
int readCalls = 0;
@@ -477,12 +451,6 @@ void AsynchIO::readable(DispatchHandle&
total += rc;
readCallback(*this, buff);
- if (readingStopped) {
- // We have been flow controlled.
- QPID_PROBE4(asynchio_read_finished_flowcontrolled, &h, duration, total, readCalls);
- break;
- }
-
if (rc != readCount) {
// If we didn't fill the read buffer then time to stop reading
QPID_PROBE4(asynchio_read_finished_done, &h, duration, total, readCalls);
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp Mon Feb 18 10:18:24 2013
@@ -286,8 +286,6 @@ public:
virtual void notifyPendingWrite();
virtual void queueWriteClose();
virtual bool writeQueueEmpty();
- virtual void startReading();
- virtual void stopReading();
virtual void requestCallback(RequestCallback);
/**
@@ -347,6 +345,12 @@ private:
void close(void);
/**
+ * startReading initiates reading, readComplete() is
+ * called when the read completes.
+ */
+ void startReading();
+
+ /**
* readComplete is called when a read request is complete.
*
* @param result Results of the operation.
@@ -565,15 +569,6 @@ void AsynchIO::startReading() {
return;
}
-// stopReading was added to prevent a race condition with read-credit on Linux.
-// It may or may not be required on windows.
-//
-// AsynchIOHandler::readbuff() calls stopReading() inside the same
-// critical section that protects startReading() in
-// AsynchIOHandler::giveReadCredit().
-//
-void AsynchIO::stopReading() {}
-
// Queue the specified callback for invocation from an I/O thread.
void AsynchIO::requestCallback(RequestCallback callback) {
// This method is generally called from a processing thread; transfer
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.cpp?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.cpp (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.cpp Mon Feb 18 10:18:24 2013
@@ -209,18 +209,6 @@ bool SslAsynchIO::writeQueueEmpty() {
return aio->writeQueueEmpty();
}
-/*
- * Initiate a read operation. AsynchIO::readComplete() will be
- * called when the read is complete and data is available.
- */
-void SslAsynchIO::startReading() {
- aio->startReading();
-}
-
-void SslAsynchIO::stopReading() {
- aio->stopReading();
-}
-
// Queue the specified callback for invocation from an I/O thread.
void SslAsynchIO::requestCallback(RequestCallback callback) {
aio->requestCallback(callback);
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h Mon Feb 18 10:18:24 2013
@@ -77,8 +77,6 @@ public:
virtual void notifyPendingWrite();
virtual void queueWriteClose();
virtual bool writeQueueEmpty();
- virtual void startReading();
- virtual void stopReading();
virtual void requestCallback(RequestCallback);
virtual BufferBase* getQueuedBuffer();
virtual SecuritySettings getSecuritySettings(void);
Propchange: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/tests:r1438054-1446845
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/CMakeLists.txt?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/CMakeLists.txt (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/CMakeLists.txt Mon Feb 18 10:18:24 2013
@@ -98,63 +98,74 @@ endif (CMAKE_SYSTEM_NAME STREQUAL Window
# when running the tests. If you want to build a subset of the tests run
# ccmake and set unit_tests_to_build to the set you want to build.
-set(unit_tests_to_build
- exception_test
- RefCounted
- SessionState
- logging
- AsyncCompletion
- Url
- Uuid
- Shlib
- FieldValue
- FieldTable
+set(all_unit_tests
+ AccumulatedAckTest
Array
- QueueOptionsTest
- InlineAllocator
- InlineVector
- ClientSessionTest
- MessagingSessionTests
- SequenceSet
- StringUtils
- RangeSet
+ AsyncCompletion
AtomicValue
- QueueTest
- AccumulatedAckTest
- DtxWorkRecordTest
+ ClientMessage
+ ClientMessageTest
+ ClientSessionTest
+ ConsoleTest
DeliveryRecordTest
+ DtxWorkRecordTest
+ exception_test
ExchangeTest
+ FieldTable
+ FieldValue
+ FrameDecoder
+ FramingTest
HeadersExchangeTest
+ HeaderTest
+ InlineAllocator
+ InlineVector
+ logging
+ ManagementTest
+ MessageReplayTracker
MessageTest
+ MessagingSessionTests
+ PollableCondition
+ ProxyTest
QueueDepth
- QueueRegistryTest
- QueuePolicyTest
QueueFlowLimitTest
- FramingTest
- HeaderTest
+ QueueOptionsTest
+ QueuePolicyTest
+ QueueRegistryTest
+ QueueTest
+ RangeSet
+ RefCounted
+ RetryList
SequenceNumberTest
+ SequenceSet
+ SessionState
+ Shlib
+ StringUtils
+ SystemInfo
TimerTest
TopicExchangeTest
TxBufferTest
- ManagementTest
- MessageReplayTracker
- ConsoleTest
- ProxyTest
- RetryList
- FrameDecoder
- ClientMessageTest
- PollableCondition
+ Url
+ Uuid
Variant
- ClientMessage
- SystemInfo
${xml_tests}
+ )
+
+set(unit_tests_to_build
+ ""
CACHE STRING "Which unit tests to build"
)
mark_as_advanced(unit_tests_to_build)
+# If no unit_test specifically set then use all unit tests
+if (unit_tests_to_build)
+set(actual_unit_tests ${unit_tests_to_build})
+else()
+set(actual_unit_tests ${all_unit_tests})
+endif()
+
add_executable (unit_test unit_test
- ${unit_tests_to_build} ${platform_test_additions})
+ ${actual_unit_tests} ${platform_test_additions})
target_link_libraries (unit_test
${qpid_test_boost_libs}
qpidmessaging qpidbroker qmfconsole)
@@ -319,6 +330,7 @@ if (BUILD_ACL)
add_test (acl_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_acl_tests${test_script_suffix})
endif (BUILD_ACL)
add_test (dynamic_log_level_test ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/dynamic_log_level_test${test_script_suffix})
+add_test (dynamic_log_hires_timestamp ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/dynamic_log_hires_timestamp${test_script_suffix})
if (BUILD_MSSQL)
add_test (store_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_store_tests${test_script_suffix} MSSQL)
endif (BUILD_MSSQL)
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/Makefile.am?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/Makefile.am (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/Makefile.am Mon Feb 18 10:18:24 2013
@@ -298,7 +298,7 @@ system_tests = qpid-client-test quick_pe
TESTS += start_broker $(system_tests) python_tests stop_broker \
run_ha_tests run_federation_tests run_federation_sys_tests \
run_acl_tests run_cli_tests dynamic_log_level_test \
- run_queue_flow_limit_tests ipv6_test
+ dynamic_log_hires_timestamp run_queue_flow_limit_tests ipv6_test
EXTRA_DIST += \
run_test vg_check \
@@ -325,6 +325,7 @@ EXTRA_DIST += \
ring_queue_test \
run_ring_queue_test \
dynamic_log_level_test \
+ dynamic_log_hires_timestamp \
qpid-ctrl \
CMakeLists.txt \
windows/DisableWin32ErrorWindows.cpp \
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/acl.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/acl.py?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/acl.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/acl.py Mon Feb 18 10:18:24 2013
@@ -2065,36 +2065,242 @@ class ACLTests(TestBase010):
# Connection limits
#=====================================
- def test_connection_limits(self):
+ def test_connection_limits_cli_sets_all(self):
+
+ try:
+ sessiona1 = self.get_session_by_port('alice','alice', self.port_u())
+ sessiona2 = self.get_session_by_port('alice','alice', self.port_u())
+ except Exception, e:
+ self.fail("Could not create two connections for user alice: " + str(e))
+
+ # Third session should fail
+ try:
+ sessiona3 = self.get_session_by_port('alice','alice', self.port_u())
+ self.fail("Should not be able to create third connection for user alice")
+ except Exception, e:
+ result = None
+
+
+
+ def test_connection_limits_by_named_user(self):
"""
Test ACL control connection limits
"""
+ aclf = self.get_acl_file()
+ aclf.write('quota connections 2 alice bob\n')
+ aclf.write('quota connections 0 evildude\n')
+ aclf.write('acl allow all all')
+ aclf.close()
+
+ result = self.reload_acl()
+ if (result):
+ self.fail(result)
+
# By username should be able to connect twice per user
try:
- sessiona1 = self.get_session_by_port('alice','alice', self.port_u())
- sessiona2 = self.get_session_by_port('alice','alice', self.port_u())
+ sessiona1 = self.get_session('alice','alice')
+ sessiona2 = self.get_session('alice','alice')
except Exception, e:
self.fail("Could not create two connections for user alice: " + str(e))
# Third session should fail
try:
- sessiona3 = self.get_session_by_port('alice','alice', self.port_u())
+ sessiona3 = self.get_session('alice','alice')
self.fail("Should not be able to create third connection for user alice")
except Exception, e:
result = None
+ # Disconnecting should allow another session.
+ sessiona1.close()
+ try:
+ sessiona3 = self.get_session('alice','alice')
+ except Exception, e:
+ self.fail("Could not recreate second connection for user alice: " + str(e))
+
+ # By username should be able to connect twice per user
try:
- sessionb1 = self.get_session_by_port('bob','bob', self.port_u())
- sessionb2 = self.get_session_by_port('bob','bob', self.port_u())
+ sessionb1 = self.get_session('bob','bob')
+ sessionb2 = self.get_session('bob','bob')
except Exception, e:
self.fail("Could not create two connections for user bob: " + str(e))
+ # Third session should fail
try:
- sessionb3 = self.get_session_by_port('bob','bob', self.port_u())
+ sessionb3 = self.get_session('bob','bob')
self.fail("Should not be able to create third connection for user bob")
except Exception, e:
result = None
+
+ # User with quota of 0 is denied
+ try:
+ sessione1 = self.get_session('evildude','evildude')
+ self.fail("Should not be able to create a connection for user evildude")
+ except Exception, e:
+ result = None
+
+
+ # User not named in quotas is denied
+ try:
+ sessionc1 = self.get_session('charlie','charlie')
+ self.fail("Should not be able to create a connection for user charlie")
+ except Exception, e:
+ result = None
+
+ # Clean up the sessions
+ sessiona2.close()
+ sessiona3.close()
+ sessionb1.close()
+ sessionb2.close()
+
+
+
+ def test_connection_limits_by_unnamed_all(self):
+ """
+ Test ACL control connection limits
+ """
+ aclf = self.get_acl_file()
+ aclf.write('quota connections 2 alice bob\n')
+ aclf.write('quota connections 1 all\n')
+ aclf.write('acl allow all all')
+ aclf.close()
+
+ result = self.reload_acl()
+ if (result):
+ self.fail(result)
+
+ # By username should be able to connect twice per user
+ try:
+ sessiona1 = self.get_session('alice','alice')
+ sessiona2 = self.get_session('alice','alice')
+ except Exception, e:
+ self.fail("Could not create two connections for user alice: " + str(e))
+
+ # Third session should fail
+ try:
+ sessiona3 = self.get_session('alice','alice')
+ self.fail("Should not be able to create third connection for user alice")
+ except Exception, e:
+ result = None
+
+ # By username should be able to connect twice per user
+ try:
+ sessionb1 = self.get_session('bob','bob')
+ sessionb2 = self.get_session('bob','bob')
+ except Exception, e:
+ self.fail("Could not create two connections for user bob: " + str(e))
+
+ # Third session should fail
+ try:
+ sessionb3 = self.get_session('bob','bob')
+ self.fail("Should not be able to create third connection for user bob")
+ except Exception, e:
+ result = None
+
+ # User not named in quotas gets 'all' quota
+ try:
+ sessionc1 = self.get_session('charlie','charlie')
+ except Exception, e:
+ self.fail("Could not create one connection for user charlie: " + str(e))
+
+ # Next session should fail
+ try:
+ sessionc2 = self.get_session('charlie','charlie')
+ self.fail("Should not be able to create second connection for user charlie")
+ except Exception, e:
+ result = None
+
+ # Clean up the sessions
+ sessiona1.close()
+ sessiona2.close()
+ sessionb1.close()
+ sessionb2.close()
+ sessionc1.close()
+
+
+ def test_connection_limits_by_group(self):
+ """
+ Test ACL control connection limits
+ """
+ aclf = self.get_acl_file()
+ aclf.write('group stooges moe@QPID larry@QPID curly@QPID\n')
+ aclf.write('quota connections 2 alice bob\n')
+ aclf.write('quota connections 2 stooges charlie\n')
+ aclf.write('# user and groups may be overwritten. Should use last value\n')
+ aclf.write('quota connections 3 bob stooges\n')
+ aclf.write('acl allow all all')
+ aclf.close()
+
+ result = self.reload_acl()
+ if (result):
+ self.fail(result)
+
+ # Alice gets 2
+ try:
+ sessiona1 = self.get_session('alice','alice')
+ sessiona2 = self.get_session('alice','alice')
+ except Exception, e:
+ self.fail("Could not create two connections for user alice: " + str(e))
+
+ # Third session should fail
+ try:
+ sessiona3 = self.get_session('alice','alice')
+ self.fail("Should not be able to create third connection for user alice")
+ except Exception, e:
+ result = None
+
+ # Bob gets 3
+ try:
+ sessionb1 = self.get_session('bob','bob')
+ sessionb2 = self.get_session('bob','bob')
+ sessionb3 = self.get_session('bob','bob')
+ except Exception, e:
+ self.fail("Could not create three connections for user bob: " + str(e))
+
+ # Fourth session should fail
+ try:
+ sessionb4 = self.get_session('bob','bob')
+ self.fail("Should not be able to create fourth connection for user bob")
+ except Exception, e:
+ result = None
+
+ # Moe gets 3
+ try:
+ sessionm1 = self.get_session('moe','moe')
+ sessionm2 = self.get_session('moe','moe')
+ sessionm3 = self.get_session('moe','moe')
+ except Exception, e:
+ self.fail("Could not create three connections for user moe: " + str(e))
+
+ # Fourth session should fail
+ try:
+ sessionb4 = self.get_session('moe','moe')
+ self.fail("Should not be able to create fourth connection for user ,pe")
+ except Exception, e:
+ result = None
+
+ # User not named in quotas is denied
+ try:
+ sessions1 = self.get_session('shemp','shemp')
+ self.fail("Should not be able to create a connection for user shemp")
+ except Exception, e:
+ result = None
+
+ # Clean up the sessions
+ sessiona1.close()
+ sessiona2.close()
+ sessionb1.close()
+ sessionb2.close()
+ sessionb3.close()
+ sessionm1.close()
+ sessionm2.close()
+ sessionm3.close()
+
+
+ def test_connection_limits_by_ip_address(self):
+ """
+ Test ACL control connection limits by ip address
+ """
# By IP address should be able to connect twice per client address
try:
sessionb1 = self.get_session_by_port('alice','alice', self.port_i())
@@ -2109,6 +2315,8 @@ class ACLTests(TestBase010):
except Exception, e:
result = None
+ sessionb1.close()
+ sessionb2.close()
#=====================================
# User name substitution
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/ha_test.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/ha_test.py?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/ha_test.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/ha_test.py Mon Feb 18 10:18:24 2013
@@ -99,7 +99,8 @@ class HaBroker(Broker):
args = args + ["--sasl-mechanism", cred.mechanism]
self.qpid_ha_script.main_except(["", "-b", url]+args)
- def promote(self): self.ready(); self.qpid_ha(["promote"])
+ def promote(self):
+ self.ready(); self.qpid_ha(["promote"])
def set_public_url(self, url): self.qpid_ha(["set", "--public-url", url])
def set_brokers_url(self, url): self.qpid_ha(["set", "--brokers-url", url])
def replicate(self, from_broker, queue): self.qpid_ha(["replicate", from_broker, queue])
@@ -208,8 +209,14 @@ class HaBroker(Broker):
class HaCluster(object):
_cluster_count = 0
- def __init__(self, test, n, promote=True, **kwargs):
- """Start a cluster of n brokers"""
+ def __init__(self, test, n, promote=True, wait=True, **kwargs):
+ """Start a cluster of n brokers.
+
+ @test: The test being run
+ @n: start n brokers
+ @promote: promote self[0] to primary
+ @wait: wait for primary active and backups ready. Ignored if promote=False
+ """
self.test = test
self.kwargs = kwargs
self._brokers = []
@@ -218,7 +225,12 @@ class HaCluster(object):
HaCluster._cluster_count += 1
for i in xrange(n): self.start(False)
self.update_urls()
- if promote: self[0].promote()
+ if promote:
+ self[0].promote()
+ if wait:
+ self[0].wait_status("active")
+ for b in self[1:]: b.wait_status("ready")
+
def next_name(self):
name="cluster%s-%s"%(self.id, self.broker_id)
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/ha_tests.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/ha_tests.py?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/ha_tests.py (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/ha_tests.py Mon Feb 18 10:18:24 2013
@@ -270,7 +270,6 @@ class ReplicationTests(HaBrokerTest):
def test_qpid_config_replication(self):
"""Set up replication via qpid-config"""
brokers = HaCluster(self,2)
- brokers[0].wait_status("active")
brokers[0].config_declare("q","all")
brokers[0].connect().session().sender("q").send("foo")
brokers[1].assert_browse_backup("q", ["foo"])
@@ -465,8 +464,10 @@ class ReplicationTests(HaBrokerTest):
def test_replicate_default(self):
"""Make sure we don't replicate if ha-replicate is unspecified or none"""
cluster1 = HaCluster(self, 2, ha_replicate=None)
+ cluster1[1].wait_status("ready")
c1 = cluster1[0].connect().session().sender("q;{create:always}")
cluster2 = HaCluster(self, 2, ha_replicate="none")
+ cluster2[1].wait_status("ready")
cluster2[0].connect().session().sender("q;{create:always}")
time.sleep(.1) # Give replication a chance.
try:
@@ -613,8 +614,6 @@ acl deny all all
to new members of a cluster. """
cluster = HaCluster(self, 2)
s = cluster[0].connect().session()
- cluster[0].wait_status("active")
- cluster[1].wait_status("ready")
# altex exchange: acts as alternate exchange
s.sender("altex;{create:always,node:{type:topic,x-declare:{type:'fanout'}}}")
# altq queue bound to altex, collect re-routed messages.
@@ -703,15 +702,17 @@ acl deny all all
s.sender("e1;{create:always, node:{type:topic}}")
# cluster[1] will be the backup, has extra queues/exchanges
+ xdecl = "x-declare:{arguments:{'qpid.replicate':'all'}}"
+ node = "node:{%s}"%(xdecl)
s = cluster[1].connect_admin().session()
- s.sender("q1;{create:always}")
- s.sender("q2;{create:always}")
- s.sender("e1;{create:always, node:{type:topic}}")
- s.sender("e2;{create:always, node:{type:topic}}")
+ s.sender("q1;{create:always, %s}"%(node))
+ s.sender("q2;{create:always, %s}"%(node))
+ s.sender("e1;{create:always, node:{type:topic, %s}}"%(xdecl))
+ s.sender("e2;{create:always, node:{type:topic, %s}}"%(xdecl))
for a in ["q1", "q2", "e1", "e2"]: cluster[1].wait_backup(a)
cluster[0].promote()
- # Verify the backup deletes the surpluis queue and exchange
+ # Verify the backup deletes the surplus queue and exchange
cluster[1].wait_status("ready")
s = cluster[1].connect_admin().session()
self.assertRaises(NotFound, s.receiver, ("q2"));
@@ -722,7 +723,6 @@ acl deny all all
"""Regression test for QPID-4285: on deleting a queue it gets stuck in a
partially deleted state and causes replication errors."""
cluster = HaCluster(self,2)
- cluster[1].wait_status("ready")
s = cluster[0].connect().session()
s.receiver("q;{create:always}")
cluster[1].wait_backup("q")
@@ -804,15 +804,14 @@ acl deny all all
cluster[1].wait_queue("q1")
cluster[0].kill()
cluster[1].wait_queue("q1") # Not timed out yet
- cluster[1].wait_no_queue("q1") # Wait for timeout
- cluster[1].wait_no_queue("q0")
+ cluster[1].wait_no_queue("q1", timeout=5) # Wait for timeout
+ cluster[1].wait_no_queue("q0", timeout=5) # Wait for timeout
def test_alt_exchange_dup(self):
"""QPID-4349: if a queue has an alterante exchange and is deleted the
messages appear twice on the alternate, they are rerouted once by the
primary and again by the backup."""
cluster = HaCluster(self,2)
- cluster[0].wait_status("active")
# Set up q with alternate exchange altex bound to altq.
s = cluster[0].connect().session()
@@ -842,7 +841,7 @@ acl deny all all
cluster = HaCluster(self, 2)
s = cluster[0].connect().session()
s.sender("keep;{create:always}") # Leave this queue in place.
- for i in xrange(100): # FIXME aconway 2012-10-23: ??? IS this an issue?
+ for i in xrange(1000):
s.sender("deleteme%s;{create:always,delete:always}"%(i)).close()
# It is possible for the backup to attempt to subscribe after the queue
# is deleted. This is not an error, but is logged as an error on the primary.
@@ -871,12 +870,14 @@ acl deny all all
# Simulate the race by re-creating the objects before promoting the new primary
cluster.kill(0, False)
+ xdecl = "x-declare:{arguments:{'qpid.replicate':'all'}}"
+ node = "node:{%s}"%(xdecl)
sn = cluster[1].connect_admin().session()
sn.sender("qq;{delete:always}").close()
- s = sn.sender("qq;{create:always}")
+ s = sn.sender("qq;{create:always, %s}"%(node))
s.send("foo")
sn.sender("xx;{delete:always}").close()
- sn.sender("xx;{create:always,node:{type:topic}}")
+ sn.sender("xx;{create:always,node:{type:topic,%s}}"%(xdecl))
cluster[1].promote()
cluster[1].wait_status("active")
# Verify we are not still using the old objects on cluster[2]
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/qpid-cpp-benchmark
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/qpid-cpp-benchmark?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/cpp/src/tests/qpid-cpp-benchmark Mon Feb 18 10:18:24 2013
@@ -18,7 +18,7 @@
# under the License.
#
-import optparse, time, qpid.messaging, re
+import optparse, time, qpid.messaging, re, os
from threading import Thread
from subprocess import Popen, PIPE, STDOUT
@@ -77,6 +77,10 @@ op.add_option("--no-delete", default=Fal
help="Don't delete the test queues.")
op.add_option("--fill-drain", default=False, action="store_true",
help="First fill the queues, then drain them")
+op.add_option("--qpid-send-path", default="", type="str", metavar="PATH",
+ help="path to qpid-send binary")
+op.add_option("--qpid-receive-path", default="", type="str", metavar="PATH",
+ help="path to qpid-receive binary")
single_quote_re = re.compile("'")
def posix_quote(string):
@@ -115,7 +119,7 @@ def start_receive(queue, index, opts, re
messages = msg_total/opts.receivers;
if (index < msg_total%opts.receivers): messages += 1
if (messages == 0): return None
- command = ["qpid-receive",
+ command = [os.path.join(opts.qpid_receive_path, "qpid-receive"),
"-b", broker,
"-a", address,
"-m", str(messages),
@@ -138,7 +142,7 @@ def start_receive(queue, index, opts, re
def start_send(queue, opts, broker, host):
address="%s;{%s}"%(queue,",".join(opts.send_option + ["create:always"]))
- command = ["qpid-send",
+ command = [os.path.join(opts.qpid_send_path, "qpid-send"),
"-b", broker,
"-a", address,
"--messages", str(opts.messages),
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/cpp-broker/Active-Passive-Cluster.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/cpp-broker/Active-Passive-Cluster.xml?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/cpp-broker/Active-Passive-Cluster.xml (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/cpp-broker/Active-Passive-Cluster.xml Mon Feb 18 10:18:24 2013
@@ -81,12 +81,12 @@ under the License.
in <citetitle>Programming in Apache Qpid</citetitle>.
</para>
</footnote>
- <para>
- So if the primary crashes, all the <emphasis>acknowledged</emphasis> messages will
- be available on the backup that takes over as the new primary. The
- <emphasis>unacknowledged</emphasis> messages will be re-sent by the clients. Thus
- no messages are lost.
- </para>
+ </para>
+ <para>
+ So if the primary crashes, all the <emphasis>acknowledged</emphasis>
+ messages will be available on the backup that takes over as the new
+ primary. The <emphasis>unacknowledged</emphasis> messages will be
+ re-sent by the clients. Thus no messages are lost.
</para>
<para>
Note that this means it is possible for messages to be
@@ -156,31 +156,33 @@ under the License.
<section>
<title>Limitations</title>
<para>
- There are a number of known limitations in the current preview implementation. These
- will be fixed in the production versions.
+ There are a some known limitations in the current implementation. These
+ will be fixed in furture versions.
</para>
<itemizedlist>
<listitem>
- Transactional changes to queue state are not replicated atomically. If the primary crashes
- during a transaction, it is possible that the backup could contain only part of the
- changes introduced by a transaction.
- </listitem>
- <listitem>
- Configuration changes (creating or deleting queues, exchanges and bindings) are
- replicated asynchronously. Management tools used to make changes will consider
- the change complete when it is complete on the primary, it may not yet be
- replicated to all the backups.
+ <para>
+ Transactional changes to queue state are not replicated atomically. If
+ the primary crashes during a transaction, it is possible that the
+ backup could contain only part of the changes introduced by a
+ transaction.
+ </para>
</listitem>
<listitem>
- Deletions made immediately after a failure (before all the backups are ready)
- may be lost on a backup. Queues, exchange or bindings that were deleted on the
- primary could re-appear if that backup is promoted to primary on a subsequent
- failure.
+ <para>
+ Configuration changes (creating or deleting queues, exchanges and
+ bindings) are replicated asynchronously. Management tools used to
+ make changes will consider the change complete when it is complete
+ on the primary, it may not yet be replicated to all the backups.
+ </para>
</listitem>
<listitem>
- Federated links <emphasis>from</emphasis> the primary will be lost in fail over,
- they will not be re-connected to the new primary. Federation links
- <emphasis>to</emphasis> the primary will fail over.
+ <para>
+ Federated links <emphasis>from</emphasis> the primary will be lost
+ in fail over, they will not be re-connected to the new
+ primary. Federation links <emphasis>to</emphasis> the primary will
+ fail over.
+ </para>
</listitem>
</itemizedlist>
</section>
@@ -285,7 +287,6 @@ ssl_addr = "ssl:" host [":" port]'
</row>
<row>
<entry><literal>ha-replicate </literal><replaceable>VALUE</replaceable></entry>
- <foo/>
<entry>
<para>
Specifies whether queues and exchanges are replicated by default.
@@ -388,7 +389,7 @@ ssl_addr = "ssl:" host [":" port]'
clustered services using <command>cman</command> and
<command>rgmanager</command>. It will show you how to configure an active-passive,
hot-standby <command>qpidd</command> HA cluster with <command>rgmanager</command>.
- </para>
+ </para>
<para>
You must provide a <literal>cluster.conf</literal> file to configure
<command>cman</command> and <command>rgmanager</command>. Here is
@@ -545,15 +546,21 @@ NOTE: fencing is not shown, you must con
option. It has one of the following values:
<itemizedlist>
<listitem>
- <firstterm>all</firstterm>: Replicate everything automatically: queues,
- exchanges, bindings and messages.
+ <para>
+ <firstterm>all</firstterm>: Replicate everything automatically: queues,
+ exchanges, bindings and messages.
+ </para>
</listitem>
<listitem>
- <firstterm>configuration</firstterm>: Replicate the existence of queues,
- exchange and bindings but don't replicate messages.
+ <para>
+ <firstterm>configuration</firstterm>: Replicate the existence of queues,
+ exchange and bindings but don't replicate messages.
+ </para>
</listitem>
<listitem>
- <firstterm>none</firstterm>: Don't replicate anything, this is the default.
+ <para>
+ <firstterm>none</firstterm>: Don't replicate anything, this is the default.
+ </para>
</listitem>
</itemizedlist>
</para>
@@ -606,12 +613,17 @@ NOTE: fencing is not shown, you must con
each type of client). There are two possibilities
<itemizedlist>
<listitem>
- The URL contains multiple addresses, one for each broker in the cluster.
+ <para>
+ The URL contains multiple addresses, one for each broker in the cluster.
+ </para>
</listitem>
<listitem>
- The URL contains a single <firstterm>virtual IP address</firstterm>
- that is assigned to the primary broker by the resource manager.
- <footnote><para>Only if the resource manager supports virtual IP addresses</para></footnote>
+ <para>
+ The URL contains a single <firstterm>virtual IP address</firstterm>
+ that is assigned to the primary broker by the resource manager.
+ <footnote><para>Only if the resource manager supports virtual IP
+ addresses</para></footnote>
+ </para>
</listitem>
</itemizedlist>
In the first case, clients will repeatedly re-try each address in the URL
@@ -808,10 +820,10 @@ NOTE: fencing is not shown, you must con
<para>
To integrate with a different resource manager you must configure it to:
<itemizedlist>
- <listitem>Start a qpidd process on each node of the cluster.</listitem>
- <listitem>Restart qpidd if it crashes.</listitem>
- <listitem>Promote exactly one of the brokers to primary.</listitem>
- <listitem>Detect a failure and promote a new primary.</listitem>
+ <listitem><para>Start a qpidd process on each node of the cluster.</para></listitem>
+ <listitem><para>Restart qpidd if it crashes.</para></listitem>
+ <listitem><para>Promote exactly one of the brokers to primary.</para></listitem>
+ <listitem><para>Detect a failure and promote a new primary.</para></listitem>
</itemizedlist>
</para>
<para>
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-Config-Files.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-Config-Files.xml?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-Config-Files.xml (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-Config-Files.xml Mon Feb 18 10:18:24 2013
@@ -23,4 +23,156 @@
<section id="Java-Broker-Configuring-And-Managing-Config-Files">
<title>Config Files</title>
+ <para>
+ This section shows how to configure and manage broker.
+ </para>
+
+ <section role="h2" id="Java-Broker-Configuring-And-Managing-Config-Files-Configuration">
+ <title>Configuration file</title>
+ <para>Broker can be configured using XML configuration files. By default, broker is looking for configuration file at ${QPID_HOME}/etc/config.xml. The default configuration location can be overridden by specifying command line option <emphasis>-c <path to configuration></emphasis> on broker start up.</para>
+ </section>
+
+ <section role="h2" id="Java-Broker-Configuring-And-Managing-Config-Files-Management">
+ <title>Management Configuration</title>
+ <para>
+ Management interfaces can be configured in <emphasis>management</emphasis> section of broker configuration file. The example of the management section is provided below.
+ </para>
+ <example>
+ <title>Management configuration</title>
+ <programlisting><![CDATA[
+ <broker>
+ ...
+ <management>
+ <enabled>true</enabled>
+ <jmxport>
+ <registryServer>8999</registryServer>
+ </jmxport>
+ <ssl>
+ <enabled>false</enabled>
+ <keyStorePath>${conf}/qpid.keystore</keyStorePath>
+ <keyStorePassword>password</keyStorePassword>
+ </ssl>
+ <http>
+ <enabled>true</enabled>
+ </http>
+ <https>
+ <enabled>false</enabled>
+ </https>
+ </management>
+ ...
+ </broker>]]></programlisting>
+ </example>
+ </section>
+ <section role="h2" id="Java-Broker-Configuring-And-Managing-Config-Files-JMX-Management">
+ <title>JMX Management Configuration</title>
+ <para>
+ JMX management can be configured in <emphasis>management</emphasis> section of broker configuration file.
+ </para>
+ <para>An <emphasis>enabled</emphasis> element in the <emphasis>management</emphasis> section is used to enable or disable the JMX interfaces. Setting it to <emphasis>true</emphasis> causes the broker to start the management plugin if such is available on the broker classpath.</para>
+ <para>JMX management requires two ports which can be configured in <emphasis>jmxport</emphasis> sub-section of <emphasis>management</emphasis>:
+ <itemizedlist>
+ <listitem><para>RMI port (8999 by default) can be configured in an element <emphasis>jmxport/registryServer</emphasis></para></listitem>
+ <listitem><para>Connector port can be configured in an element <emphasis>jmxport/connectorServer</emphasis>. If configuration element <emphasis>connectorServer</emphasis> is not provided than the connector port defaults to <emphasis>100 + registryServer port</emphasis>.</para></listitem>
+ </itemizedlist>
+ </para>
+ <example>
+ <title>Enabling JMX Management and configuring JMX ports</title>
+ <programlisting>
+<broker>
+...
+<management>
+ <emphasis><enabled>true</enabled></emphasis> <co id="java-broker-example-jmx-management-0"/>
+ <jmxport>
+ <emphasis><registryServer>7999</registryServer></emphasis> <co id="java-broker-example-jmx-management-1"/>
+ <emphasis><connectorServer>7998</connectorServer></emphasis> <co id="java-broker-example-jmx-management-2"/>
+ </jmxport>
+<management>
+...
+</broker></programlisting>
+ </example>
+ <para>In the snippet above the following is configured:</para>
+ <calloutlist>
+ <callout arearefs="java-broker-example-jmx-management-0"><para>Enable JMX management</para></callout>
+ <callout arearefs="java-broker-example-jmx-management-1"><para>Set RMI port to 7999</para></callout>
+ <callout arearefs="java-broker-example-jmx-management-2"><para>Set connector port to 7998</para></callout>
+ </calloutlist>
+ <para>SSL can be configured to use on the connector port in the sub-section <emphasis>ssl</emphasis> of the <emphasis>management</emphasis> section. See <xref linkend="Java-Broker-Configuring-And-Managing-Config-Files-SSL-keystore-configuration"/> for details.</para>
+ <para>In order to use SSL with JMX management an element <emphasis>ssl/enabled</emphasis> needs to be set to <emphasis>true</emphasis>.</para>
+ </section>
+ <section role="h2" id="Java-Broker-Configuring-And-Managing-Config-Files-SSL-keystore-configuration">
+ <title>Management SSL key store configuration</title>
+ <para>
+ This section describes how to configure the key store to use in SSL connections in both JMX and Web management interfaces.
+ </para>
+ <para>The following examples demonstrates how to configure keystore for management</para>
+ <example>
+ <title>Management key store configuration</title>
+ <programlisting>
+<broker>
+...
+<management>
+...
+ <ssl>
+ <enabled>true</enabled> <co id="java-broker-example-management-keystore-0"/>
+ <keyStorePath>${conf}/qpid.keystore</keyStorePath> <co id="java-broker-example-management-keystore-1"/>
+ <keyStorePassword>password</keyStorePassword> <co id="java-broker-example-management-keystore-2"/>
+ </ssl>
+...
+<management>
+...
+</broker></programlisting>
+ </example>
+ <calloutlist>
+ <callout arearefs="java-broker-example-management-keystore-0"><para>Enable SSL on JMX connector port only. This setting does not effect the web management interfaces.</para></callout>
+ <callout arearefs="java-broker-example-management-keystore-1"><para>Set path to the key store file</para></callout>
+ <callout arearefs="java-broker-example-management-keystore-2"><para>Set keystore password</para></callout>
+ </calloutlist>
+ </section>
+ <section role="h2" id="Java-Broker-Configuring-And-Managing-Config-Files-Web-Management">
+ <title>Web Management Configuration</title>
+ <para>
+ Web management can be configured in <emphasis>management</emphasis> section of broker configuration file.
+ </para>
+ <para>Sub-section <emphasis>http</emphasis> is used to enable web management on http port.</para>
+ <para>Sub-section <emphasis>https</emphasis> is used to enable web management on https port.</para>
+ <para>The following example shows how to configure http and https ports</para>
+ <example>
+ <title>Enabling web management</title>
+ <programlisting>
+<broker>
+...
+<management>
+...
+ <http>
+ <enabled>true</enabled> <co id="java-broker-example-management-web-0"/>
+ <port>9090</keyStorePath> <co id="java-broker-example-management-web-1"/>
+ <basic-auth>false</basic-auth> <co id="java-broker-example-management-web-2"/>
+ <sasl-auth>true</sasl-auth> <co id="java-broker-example-management-web-3"/>
+ <session-timeout>600</session-timeout> <co id="java-broker-example-management-web-4"/>
+ </http>
+
+ <https>
+ <enabled>true</enabled> <co id="java-broker-example-management-web-5"/>
+ <port>9443</keyStorePath> <co id="java-broker-example-management-web-6"/>
+ <sasl-auth>true</sasl-auth> <co id="java-broker-example-management-web-7"/>
+ <basic-auth>true</basic-auth> <co id="java-broker-example-management-web-8"/>
+ </https>
+...
+<management>
+...
+</broker></programlisting>
+ </example>
+ <calloutlist>
+ <callout arearefs="java-broker-example-management-web-0"><para>Enable web management on http port. Default is true.</para></callout>
+ <callout arearefs="java-broker-example-management-web-1"><para>Set web management http port to 9090. Default is 8080.</para></callout>
+ <callout arearefs="java-broker-example-management-web-2"><para>Disable basic authentication on http port for REST services only. Default is false.</para></callout>
+ <callout arearefs="java-broker-example-management-web-3"><para>Enable SASL authentication on http port for REST services and web console. Default is true.</para></callout>
+ <callout arearefs="java-broker-example-management-web-4"><para>Set session timeout in seconds. Default is 15 minutes.</para></callout>
+ <callout arearefs="java-broker-example-management-web-5"><para>Enable web management on https port. Default is false.</para></callout>
+ <callout arearefs="java-broker-example-management-web-6"><para>Set web management https port to 9443. Default is 8443.</para></callout>
+ <callout arearefs="java-broker-example-management-web-7"><para>Enable SASL authentication on https port for REST services and web console. Default is true.</para></callout>
+ <callout arearefs="java-broker-example-management-web-8"><para>Enable basic authentication on https port for REST services only. Default is true.</para></callout>
+ </calloutlist>
+ <note><para>Please configure the keystore to use with the https web management port. See <xref linkend="Java-Broker-Configuring-And-Managing-Config-Files-SSL-keystore-configuration"/> for details.</para></note>
+ </section>
</section>
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-REST-API.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-REST-API.xml?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-REST-API.xml (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-REST-API.xml Mon Feb 18 10:18:24 2013
@@ -22,5 +22,242 @@
<section id="Java-Broker-Configuring-And-Managing-REST-API">
<title>REST API</title>
+ <section id="Java-Broker-Configuring-And-Managing-REST-API-Overview">
+ <title>REST API Overview</title>
+ <para>This section provides an overview of REST management API.</para>
+ <para>If web management is enabled (see <xref linkend="Java-Broker-Configuring-And-Managing-Config-Files-Web-Management"/>)
+ the REST API can be used to monitor and manage the broker instance.</para>
+ <para>The Qpid broker REST services support traditional REST model which uses the GET method requests to retrieve
+ the information about broker configured objects, DELETE method requests to delete the configured object,
+ PUT to create the configured object and POST to update the configured objects.</para>
+ <para>The table below lists the available REST services with brief description how they can be used.</para>
+ <table>
+ <title>Rest services</title>
+ <tgroup cols="6">
+ <thead>
+ <row>
+ <entry>Rest service URL</entry>
+ <entry>Description</entry>
+ <entry>GET</entry>
+ <entry>PUT</entry>
+ <entry>POST</entry>
+ <entry>DELETE</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><para>/rest/broker</para></entry>
+ <entry><para>Rest service to manage broker instance</para></entry>
+ <entry><para>Retrieves the details of broker configuration</para></entry>
+ <entry><para>Not implemented yet</para></entry>
+ <entry><para>Not implemented yet</para></entry>
+ <entry><para>Not implemented yet</para></entry>
+ </row>
+ <row>
+ <entry><para>/rest/authenticationprovider</para>
+ <para>/rest/authenticationprovider/<authentication provider name></para>
+ </entry>
+ <entry>Rest service to manage authentication providers on the broker</entry>
+ <entry>Retrieves the details about authentication providers</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry><para>/rest/user</para>
+ <para>/rest/user/<authentication provider name>/<user name></para>
+ </entry>
+ <entry>Rest service to manage user account</entry>
+ <entry>Retrieves the details about user account</entry>
+ <entry>Creates user account</entry>
+ <entry>Updates user password</entry>
+ <entry>Deletes user account</entry>
+ </row>
+ <row>
+ <entry><para>/rest/groupprovider</para>
+ <para>/rest/groupprovider/<group provider name></para>
+ </entry>
+ <entry>Rest service to manage group providers</entry>
+ <entry>Retrieves the details about group provider(s)</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry><para>/rest/group</para>
+ <para>/rest/group/<group provider name>/<group name></para>
+ </entry>
+ <entry>Rest service to manage user group</entry>
+ <entry>Retrieves the details about user group</entry>
+ <entry>Creates group</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Deletes group</entry>
+ </row>
+ <row>
+ <entry><para>/rest/groupmember</para>
+ <para>/rest/groupmember/<group provider name >/<group name>/<user name></para>
+ </entry>
+ <entry>Rest service to manage group member(s)</entry>
+ <entry>Retrieves the details about group member(s)</entry>
+ <entry>Add user to group</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Deletes user from group</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/port</para>
+ <para>/rest/port/<port name></para>
+ </entry>
+ <entry>Rest service to manage broker ports(s)</entry>
+ <entry>Retrieves the details about the broker port(s)</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/port</para>
+ <para>/rest/port/<port name></para>
+ </entry>
+ <entry>Rest service to manage broker ports(s)</entry>
+ <entry>Retrieves the details about the broker port(s)</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/queue</para>
+ <para>/rest/queue/<virtual host name>/>queue name></para>
+ </entry>
+ <entry>Rest service to manage queue(s)</entry>
+ <entry>Retrieves the details about the queue(s)</entry>
+ <entry>Creates queue</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Deletes queue</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/exchange</para>
+ <para>/rest/exchange/<virtual host name>/<exchange name></para>
+ </entry>
+ <entry>Rest service to manage exchange(s)</entry>
+ <entry>Retrieves the details about the exchange(s)</entry>
+ <entry>Creates exchange</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Deletes exchange</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/binding</para>
+ <para>/rest/binding/<virtual host name>/<exchange name>/<queue name>/<binding name></para>
+ </entry>
+ <entry>Rest service to manage binding(s)</entry>
+ <entry>Retrieves the details about the binding(s)</entry>
+ <entry>Binds a queue to an exchange</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Deletes binding</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/connection</para>
+ <para>/rest/connection/<virtual host name>/<connection name></para>
+ </entry>
+ <entry>Rest service to manage connection(s)</entry>
+ <entry>Retrieves the details about the connection(s)</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/session</para>
+ <para>/rest/session/<virtual host name>/<connection name>/<session name></para>
+ </entry>
+ <entry>Rest service to manage session(s)</entry>
+ <entry>Retrieves the details about the session(s)</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/message/*</para>
+ </entry>
+ <entry>Rest service to manage messages(s)</entry>
+ <entry>Retrieves the details about the messages(s)</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Copies, moves messages</entry>
+ <entry>Deletes messages</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/message-content/*</para>
+ </entry>
+ <entry>Rest service to retrieve message content</entry>
+ <entry>Retrieves the message content</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/logrecords</para>
+ </entry>
+ <entry>Rest service to retrieve broker logs</entry>
+ <entry>Retrieves the broker logs</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/sasl</para>
+ </entry>
+ <entry>Sasl authentication</entry>
+ <entry>Retrieves user current authentication status and broker supported SASL mechanisms</entry>
+ <entry>Authenticates user using supported SASL mechanisms</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ <row>
+ <entry>
+ <para>/rest/logout</para>
+ </entry>
+ <entry>Log outs</entry>
+ <entry>Log outs user</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ <entry>Not implemented yet</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>Rest URL are hierarchical. It is permitted to replace rest URL elements with an "asterisks" in GET requests to denote
+ all object of a particular type. Additionally, trailing object type in the URL hierarchy can be omitted.
+ In this case GET request will return all of the object underneath of the current object.</para>
+ <para>For example, for binding URL http://localhost:8080/rest/binding/<vhost>/<exchange>/<queue>/<binding>
+ replacing of <emphasis><exchange></emphasis> with "asterisks" (http://localhost:8080/rest/binding/<vhost>/*/<queue>/<binding>)
+ will result in the GET response containing the list of bindings for all of the exchanges in the virtual host having the given name and given queue.
+ If <emphasis><binding></emphasis> and <emphasis><queue></emphasis> are omitted in binding REST URL
+ (http://localhost:8080/rest/binding/<vhostname>/<exchangename>) the GET request will result in returning
+ all bindings for all queues for the given exchange in the virtual host.
+ </para>
+ <example>
+ <title>Examples of queue creation using curl:</title>
+ <programlisting><![CDATA[
+#create a durable queue
+curl -X PUT -d '{"durable":true}' http://localhost:8080/rest/queue/<vhostname>/<queuename>
+#create a durable priority queue
+curl -X PUT -d '{"durable":true,"type":"priority"}' http://localhost:8080/rest/queue/<vhostname>/<queuename>
+ ]]></programlisting>
+ </example><example>
+ <title>Example of binding a queue to an exchange using curl</title>
+ <programlisting><![CDATA[
+curl -X PUT -d '{}' http://localhost:8080/rest/binding/<vhostname>/<exchangename>/<queue-name>/<binding-name>
+ ]]></programlisting>
+ </example>
+ <para>Qpid broker web management console calls rest interfaces internally to manage the broker.</para>
+ </section>
</section>
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-Web-Console.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-Web-Console.xml?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-Web-Console.xml (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Configuring-And-Managing-Web-Console.xml Mon Feb 18 10:18:24 2013
@@ -21,6 +21,15 @@
-->
<section id="Java-Broker-Configuring-And-Managing-Web-Console">
-<title>Web Console</title>
-
+ <title>Web Console</title>
+ <para>If web management is enabled (see <xref linkend="Java-Broker-Configuring-And-Managing-Config-Files-Web-Management"/>) the web management console can be accessed from web browser using URL http(s)://<hostname>:<port>/management, where</para>
+ <itemizedlist>
+ <listitem><para><emphasis>hostname</emphasis> is the broker host</para></listitem>
+ <listitem><para><emphasis>port</emphasis> is the broker port(either http or https)</para></listitem>
+ </itemizedlist>
+ <para>The page like following is displayed on navigation to the management URL.</para>
+ <figure>
+ <title>Web management Console</title>
+ <graphic fileref="images/Management-Web-Console.png"/>
+ </figure>
</section>
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Security-SSL.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Security-SSL.xml?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Security-SSL.xml (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/Java-Broker-Security-SSL.xml Mon Feb 18 10:18:24 2013
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE entities [
+<!ENTITY % entities SYSTEM "commonEntities.xml">
+%entities;
+]>
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -61,6 +65,16 @@
the configured SSL port(s) or will also bind the non-SSL port(s). Setting sslOnly to true will
disable the non-SSL ports.
</para>
+
+ <important>
+ <para>
+ The password of the certificate used by the Broker <emphasis role="bold">must</emphasis>
+ match the password of the keystore itself. This is a restriction of the Qpid Broker
+ implementation. If using the <ulink url="&oracleKeytool;">keytool</ulink> utility,
+ note that this means the argument to the <option>-keypass</option> option must match
+ the <option>-storepass</option> option.
+ </para>
+ </important>
</section>
<section role="h2" id="SSL-Truststore-ClientCertificate">
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/commonEntities.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/commonEntities.xml?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/commonEntities.xml (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/doc/book/src/java-broker/commonEntities.xml Mon Feb 18 10:18:24 2013
@@ -28,6 +28,7 @@
<!-- Oracle javadoc -->
<!ENTITY oracleJdkDocUrl "http://oracle.com/javase/6/docs/api/">
<!ENTITY oracleJeeDocUrl "http://docs.oracle.com/javaee/6/api/">
+<!ENTITY oracleKeytool "http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html">
<!-- Oracle BDB JE-->
<!ENTITY oracleJeDownloadUrl "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html?ssSourceSiteId=ocomen">
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/CMakeLists.txt?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/CMakeLists.txt (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/CMakeLists.txt Mon Feb 18 10:18:24 2013
@@ -63,14 +63,18 @@ set(CATCH_UNDEFINED "-Wl,--no-undefined"
## Build the Multi-Threaded Server Library
##
set(server_SOURCES
+ src/agent.c
src/alloc.c
src/auth.c
+ src/buffer.c
src/container.c
src/hash.c
+ src/iovec.c
src/iterator.c
src/log.c
src/message.c
src/posix/threading.c
+ src/router_node.c
src/server.c
src/timer.c
src/work_queue.c
@@ -91,4 +95,5 @@ install(FILES ${headers} DESTINATION ${I
##
## Build Tests
##
+add_subdirectory(router)
add_subdirectory(tests)
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/include/qpid/nexus/alloc.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/include/qpid/nexus/alloc.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/include/qpid/nexus/alloc.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/include/qpid/nexus/alloc.h Mon Feb 18 10:18:24 2013
@@ -42,6 +42,8 @@ typedef struct {
typedef struct {
char *type_name;
size_t type_size;
+ size_t *additional_size;
+ size_t total_size;
nx_alloc_config_t *config;
nx_alloc_stats_t *stats;
nx_alloc_pool_t *global_pool;
@@ -57,14 +59,14 @@ void nx_dealloc(nx_alloc_type_desc_t *de
T *new_##T(); \
void free_##T(T *p)
-#define ALLOC_DEFINE_CONFIG(T,C) \
- nx_alloc_type_desc_t __desc_##T = {#T, sizeof(T), C, 0, 0, 0}; \
+#define ALLOC_DEFINE_CONFIG(T,S,A,C) \
+ nx_alloc_type_desc_t __desc_##T = {#T, S, A, 0, C, 0, 0, 0}; \
__thread nx_alloc_pool_t *__local_pool_##T = 0; \
T *new_##T() { return (T*) nx_alloc(&__desc_##T, &__local_pool_##T); } \
void free_##T(T *p) { nx_dealloc(&__desc_##T, &__local_pool_##T, (void*) p); } \
nx_alloc_stats_t *alloc_stats_##T() { return __desc_##T.stats; }
-#define ALLOC_DEFINE(T) ALLOC_DEFINE_CONFIG(T, 0)
+#define ALLOC_DEFINE(T) ALLOC_DEFINE_CONFIG(T, sizeof(T), 0, 0)
#endif
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/include/qpid/nexus/container.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/include/qpid/nexus/container.h?rev=1447183&r1=1447182&r2=1447183&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/include/qpid/nexus/container.h (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/extras/nexus/include/qpid/nexus/container.h Mon Feb 18 10:18:24 2013
@@ -29,6 +29,9 @@ typedef uint8_t nx_dist_mode_t;
#define NX_DIST_MOVE 0x02
#define NX_DIST_BOTH 0x03
+/**
+ * Node Lifetime Policy (see AMQP 3.5.9)
+ */
typedef enum {
NX_LIFE_PERMANENT,
NX_LIFE_DELETE_CLOSE,
@@ -37,6 +40,10 @@ typedef enum {
NX_LIFE_DELETE_NO_LINKS_MESSAGES
} nx_lifetime_policy_t;
+
+/**
+ * Link Direction
+ */
typedef enum {
NX_INCOMING,
NX_OUTGOING
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org