svn commit: r835323 - in /qpid/trunk/qpid/cpp: include/qpid/messaging/ src/qpid/client/amqp0_10/ src/qpid/messaging/ src/tests/

2009-11-12 Thread gsim
Author: gsim
Date: Thu Nov 12 10:30:53 2009
New Revision: 835323

URL: http://svn.apache.org/viewvc?rev=835323&view=rev
Log:
Merge branch 'next_receiver_changes' into trunk

Modified:
qpid/trunk/qpid/cpp/include/qpid/messaging/Session.h
qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp
qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h
qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.h
qpid/trunk/qpid/cpp/src/qpid/messaging/Session.cpp
qpid/trunk/qpid/cpp/src/qpid/messaging/SessionImpl.h
qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp

Modified: qpid/trunk/qpid/cpp/include/qpid/messaging/Session.h
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qpid/messaging/Session.h?rev=835323&r1=835322&r2=835323&view=diff
==
--- qpid/trunk/qpid/cpp/include/qpid/messaging/Session.h (original)
+++ qpid/trunk/qpid/cpp/include/qpid/messaging/Session.h Thu Nov 12 10:30:53 
2009
@@ -88,13 +88,14 @@
 QPID_CLIENT_EXTERN bool fetch(Message& message, qpid::sys::Duration 
timeout=qpid::sys::TIME_INFINITE);
 QPID_CLIENT_EXTERN Message fetch(qpid::sys::Duration 
timeout=qpid::sys::TIME_INFINITE);
 QPID_CLIENT_EXTERN bool dispatch(qpid::sys::Duration 
timeout=qpid::sys::TIME_INFINITE);
+QPID_CLIENT_EXTERN bool nextReceiver(Receiver&, qpid::sys::Duration 
timeout=qpid::sys::TIME_INFINITE);
+QPID_CLIENT_EXTERN Receiver nextReceiver(qpid::sys::Duration 
timeout=qpid::sys::TIME_INFINITE);
+
 
 QPID_CLIENT_EXTERN Sender createSender(const Address& address);
 QPID_CLIENT_EXTERN Sender createSender(const std::string& address);
 QPID_CLIENT_EXTERN Receiver createReceiver(const Address& address);
 QPID_CLIENT_EXTERN Receiver createReceiver(const std::string& address);
-
-QPID_CLIENT_EXTERN Address createTempQueue(const std::string& baseName = 
std::string());
   private:
   friend class qpid::client::PrivateImplRef;
 };

Modified: qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp?rev=835323&r1=835322&r2=835323&view=diff
==
--- qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp Thu Nov 
12 10:30:53 2009
@@ -123,6 +123,15 @@
 return process(&handler, timeout);
 }
 
+bool IncomingMessages::getNextDestination(std::string& destination, Duration 
timeout)
+{
+//if there is not already a received message, we must wait for one
+if (received.empty() && !wait(timeout)) return false;
+//else we have a message in received; return the corresponding destination
+destination = 
received.front()->as()->getDestination();
+return true;
+}
+
 void IncomingMessages::accept()
 {
 acceptTracker.accept(session);
@@ -155,11 +164,11 @@
 }
 
 /**
- * Get a frameset from session queue, waiting for up to the specified
- * duration and returning true if this could be achieved, false
- * otherwise. If a destination is supplied, only return a message for
- * that destination. In this case messages from other destinations
- * will be held on a received queue.
+ * Get a frameset that is accepted by the specified handler from
+ * session queue, waiting for up to the specified duration and
+ * returning true if this could be achieved, false otherwise. Messages
+ * that are not accepted by the handler are pushed onto received queue
+ * for later retrieval.
  */
 bool IncomingMessages::process(Handler* handler, qpid::sys::Duration duration)
 {
@@ -183,6 +192,22 @@
 return false;
 }
 
+bool IncomingMessages::wait(qpid::sys::Duration duration)
+{
+AbsTime deadline(AbsTime::now(), duration);
+FrameSet::shared_ptr content;
+for (Duration timeout = duration; incoming->pop(content, timeout); timeout 
= Duration(AbsTime::now(), deadline)) {
+if (content->isA()) {
+QPID_LOG(debug, "Pushed " << *content->getMethod() << " to 
received queue");
+received.push_back(content);
+return true;
+} else {
+//TODO: handle other types of commands (e.g. message-accept, 
message-flow etc)
+}
+}
+return false;
+}
+
 uint32_t IncomingMessages::pendingAccept()
 {
 return acceptTracker.acceptsPending();

Modified: qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h?rev=835323&r1=835322&r2=835323&view=diff
==
--- qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/IncomingMe

[CONF] Apache Qpid > Qpid JMX Management Console User Guide

2009-11-12 Thread confluence







 Qpid JMX Management Console User Guide
 Page edited by Robbie Gemmell

 
  
 
 Qpid JMX Management Console User Guide

The guide can be found below in wiki form, or downloaded as a file: (DOC) (PDF)





Introduction 
Startup & Configuration 
Startup 
SSL configuration 
JMXMP configuration 
Managing Server Connections 
Main Toolbar 
Connecting to a new server 
Reconnecting to a server 
Disconnecting from a server 
Removing a server 
Navigating a connected server 
ConfigurationManagement MBean 
LoggingManagement MBean 
Runtime Options 
ConfigurationFile Options 
ServerInformation MBean 
UserManagement MBean 
VirtualHostManager MBean 
Notifications 
Managing Queues 
Managing Exchanges 
Managing Connections 

Introduction


The Qpid JMX Management Console is a standalone Eclipse RCP application for managing and monitoring the Qpid Java server utilising its JMX management interfaces.

This guide will give an overview of configuring the console, the features supported by it, and how to make use of the console in managing the various JMX Management Beans (MBeans) offered by the Qpid Java server.


 Startup & Configuration



Startup


The console can be started in the following way, depending on platform:

	Windows: by running the qpidmc.exe executable file.
	Linux: by running the qpidmc executable.
	Mac OS X: by launching the Qpid Management Console.app application bundle.





SSL configuration


Newer Qpid Java servers can protect their JMX connections with SSL, and this is enabled by default. When attempting to connect to a server with this enabled, the console must be able to verify the SSL certificate presented to it by the server or the connection will fail.

If the server makes use of an SSL certificate signed by a known Signing CA (Certification Authority) then the console needs no extra configuration, and will make use of Java's default system-wide CA TrustStore for certificate verification (you may however have to update the system-wide default CA TrustStore if your certified is signed by a less common CA that is not already present in it).

If however the server is equipped with a self-signed SSL certificate, then the management console must be provided with an appropriate SSL TrustStore containing the public key for the SSL certificate, so that it is able to validate it when presented by the server. The server ships with a script to create an example self-signed SSL certificate, and store the relevant entries in a KeyStore and matching TrustStore. This script can serve as a guide on how to use the Java Keytool security utility to manipulate your own stores, and more information can be found in the JSSE Reference Guide: http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores

Supplying the necessary details to the console is performed by setting the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword environment variables when starting it. This can be done at the command line, but the preferred option is to set the configuration within the qpidmc.ini launcher configuration file for repeated usage. This file is equipped with a template to ease configuration, this should be uncommented and edited to suit your needs. It can be found in the root of the console releases for Windows, and Linux. For Mac OS X the file is located within the consoles .app application bundle, and to locate and edit it you must select 'Show Package Contents' when accessing the context menu of the application, then browse to the Contents/MacOS sub folder to locate the file.


JMXMP configuration


Older releases of the Qpid Java server can make use of the Java Management Extensions Messaging Protocol (JMXMP) to provide protection for their JMX connections. This occurs when the server has its main configuration set with the management 'security-enabled' property set to true.

In order to connect to this configuration of server, the console needs an additional library that is not included within the Java SE platform and cannot be distributed with the console due to licensing restrictions.

You can download the JMX Remote API 1.0.1_04 Reference Implementation from the Sun website here. The included jmxremote-1_0_1-bin/lib/jmxremote_optional.jar file must be added to the plugins/jmxremote.sasl_1.0.1 folder of the console release (again, in Mac OS X you will need to select 'Show package contents' from the context menu whilst selecting the management console bundle in order to reveal the inner file tree).

Following this the console will automatically load the JMX Remote Optional classes and negotiate the SASL authentication profile type when encountering a JMXMP enabled Qpid Java server.

 Managing Server Connections



Main Toolbar


The main toolbar of the console can be seen in the image below. The left most buttons respectively allow for adding a new server connection, reconnecting to an existing server selected in the co

[CONF] Apache Qpid > Qpid JMX Management Console User Guide

2009-11-12 Thread confluence







 Qpid JMX Management Console User Guide
 Page edited by Robbie Gemmell

 
  
 
 Qpid JMX Management Console User Guide

Qpid JMX Management Console User Guide

The guide can be found below in wiki form, or downloaded as a file: (DOC) (PDF)





Introduction 
Startup & Configuration 
Startup 
SSL configuration 
JMXMP configuration 
Managing Server Connections 
Main Toolbar 
Connecting to a new server 
Reconnecting to a server 
Disconnecting from a server 
Removing a server 
Navigating a connected server 
ConfigurationManagement MBean 
LoggingManagement MBean 
Runtime Options 
ConfigurationFile Options 
ServerInformation MBean 
UserManagement MBean 
VirtualHostManager MBean 
Notifications 
Managing Queues 
Managing Exchanges 
Managing Connections 

Introduction


The Qpid JMX Management Console is a standalone Eclipse RCP application for managing and monitoring the Qpid Java server utilising its JMX management interfaces.

This guide will give an overview of configuring the console, the features supported by it, and how to make use of the console in managing the various JMX Management Beans (MBeans) offered by the Qpid Java server.


 Startup & Configuration



Startup


The console can be started in the following way, depending on platform:

	Windows: by running the qpidmc.exe executable file.
	Linux: by running the qpidmc executable.
	Mac OS X: by launching the Qpid Management Console.app application bundle.





SSL configuration


Newer Qpid Java servers can protect their JMX connections with SSL, and this is enabled by default. When attempting to connect to a server with this enabled, the console must be able to verify the SSL certificate presented to it by the server or the connection will fail.

If the server makes use of an SSL certificate signed by a known Signing CA (Certification Authority) then the console needs no extra configuration, and will make use of Java's default system-wide CA TrustStore for certificate verification (you may however have to update the system-wide default CA TrustStore if your certified is signed by a less common CA that is not already present in it).

If however the server is equipped with a self-signed SSL certificate, then the management console must be provided with an appropriate SSL TrustStore containing the public key for the SSL certificate, so that it is able to validate it when presented by the server. The server ships with a script to create an example self-signed SSL certificate, and store the relevant entries in a KeyStore and matching TrustStore. This script can serve as a guide on how to use the Java Keytool security utility to manipulate your own stores, and more information can be found in the JSSE Reference Guide: http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores

Supplying the necessary details to the console is performed by setting the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword environment variables when starting it. This can be done at the command line, but the preferred option is to set the configuration within the qpidmc.ini launcher configuration file for repeated usage. This file is equipped with a template to ease configuration, this should be uncommented and edited to suit your needs. It can be found in the root of the console releases for Windows, and Linux. For Mac OS X the file is located within the consoles .app application bundle, and to locate and edit it you must select 'Show Package Contents' when accessing the context menu of the application, then browse to the Contents/MacOS sub folder to locate the file.


JMXMP configuration


Older releases of the Qpid Java server can make use of the Java Management Extensions Messaging Protocol (JMXMP) to provide protection for their JMX connections. This occurs when the server has its main configuration set with the management 'security-enabled' property set to true.

In order to connect to this configuration of server, the console needs an additional library that is not included within the Java SE platform and cannot be distributed with the console due to licensing restrictions.

You can download the JMX Remote API 1.0.1_04 Reference Implementation from the Sun website here. The included jmxremote-1_0_1-bin/lib/jmxremote_optional.jar file must be added to the plugins/jmxremote.sasl_1.0.1 folder of the console release (again, in Mac OS X you will need to select 'Show package contents' from the context menu whilst selecting the management console bundle in order to reveal the inner file tree).

Following this the console will automatically load the JMX Remote Optional classes and negotiate the SASL authentication profile type when encountering a JMXMP enabled Qpid Java server.

 Managing Server Connections



Main Toolbar


The main toolbar of the console can be seen in the image below. The left most buttons respectively allow for adding a new server connection, reconnecting 

[CONF] Apache Qpid > Qpid Management Features

2009-11-12 Thread confluence







 Qpid Management Features
 Page edited by Robbie Gemmell

 
  
 
 Management tool: See our Management Console page for details of how to use various console options with the Qpid management features.

The management of QPID is categorised into following types-

	Exchange
	Queue
	Connection
	Broker



 1) Managing and Monitoring Exchanges: Following is the list of features, which we can have available for managing and monitoring an Exchange running on a Qpid Server Domain-

	Displaying the following information for monitoring purpose-
	
		The list of queues bound to the exchange along with the routing keys.
		General Exchange properties(like name, durable etc).
	
	
	Binding an existing queue with the exchange.



2) Managing and Monitoring Queues:  Following are the features, which we can have for a Queue on a Qpid Server Domain-

	Displaying the following information about the queue for monitoring purpose-
	
		General Queue properties(like name, durable, etc.)
		The maximum size of a message that can be accepted from the message producer.
		The number of the active consumers accessing the Queue.
		The total number of consumers (Active and Suspended).
		The number of undelivered messages in the Queue.
		The total number of messages received on the Queue since startup.
		The maximum number of bytes for the Queue that can be stored on the Server.
		The maximum number of messages for the Queue that can be stored on the Server.
	
	
	Viewing the messages on the Queue.
	Deleting message from top of the Queue.
	Clearing the Queue.
	Browsing the DeadMessageQueue - Messages which are expired or undelivered because of some reason are routed to the DeadMessageQueue.  This queue can not be deleted.  [Note: The is open because it depends on how these kind of messages will be handeled?]



3) Managing and Monitoring Connections: Following are the features, which we can have for a connection on a QPID Server Domain-

	Displaying general connection properties(like remote address, etc.).
	Setting maximum number of channels allowed for a connection.
	View all related channels and channel properties.
	Closing a channel.
	Commit or Rollback transactions of a channel, if the channel is transactional.
	Notification for exceeding the maximum number of channels.
	Dropping a connection.
	The work for Network IO Interface implies that there are potentially some additional requirements
	
		Alert when tcp flow control kicks in
		Information available about current memory usage available through JMX interface
		Dynamic removal of buffer bounds? (fundamentally not possible with TransportIO)
		Management functionality added to JMX interface - UI changes?
	
	



4) Managing the Broker: Features for the Broker-

	Creating an Exchange.
	Unregistering an Exchange.
	Creating a Queue.
	Deleting a Queue.


 
 
   
Change Notification Preferences
   

   View Online
   |
   View Change
  |
   Add Comment








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



[CONF] Apache Qpid > Qpid JMX Management Console User Guide

2009-11-12 Thread confluence







 Qpid JMX Management Console User Guide
 Page edited by Robbie Gemmell

 
  
 
 Qpid JMX Management Console User Guide

The guide can be found below in wiki form, or downloaded as a file: (DOC) (PDF)





Introduction 
Startup & Configuration 
Startup 
SSL configuration 
JMXMP configuration 
Managing Server Connections 
Main Toolbar 
Connecting to a new server 
Reconnecting to a server 
Disconnecting from a server 
Removing a server 
Navigating a connected server 
ConfigurationManagement MBean 
LoggingManagement MBean 
Runtime Options 
ConfigurationFile Options 
ServerInformation MBean 
UserManagement MBean 
VirtualHostManager MBean 
Notifications 
Managing Queues 
Managing Exchanges 
Managing Connections 

Introduction


The Qpid JMX Management Console is a standalone Eclipse RCP application for managing and monitoring the Qpid Java server utilising its JMX management interfaces.

This guide will give an overview of configuring the console, the features supported by it, and how to make use of the console in managing the various JMX Management Beans (MBeans) offered by the Qpid Java server.


 Startup & Configuration



Startup


The console can be started in the following way, depending on platform:

	Windows: by running the qpidmc.exe executable file.
	Linux: by running the qpidmc executable.
	Mac OS X: by launching the Qpid Management Console.app application bundle.





SSL configuration


Newer Qpid Java servers can protect their JMX connections with SSL, and this is enabled by default. When attempting to connect to a server with this enabled, the console must be able to verify the SSL certificate presented to it by the server or the connection will fail.

If the server makes use of an SSL certificate signed by a known Signing CA (Certification Authority) then the console needs no extra configuration, and will make use of Java's default system-wide CA TrustStore for certificate verification (you may however have to update the system-wide default CA TrustStore if your certified is signed by a less common CA that is not already present in it).

If however the server is equipped with a self-signed SSL certificate, then the management console must be provided with an appropriate SSL TrustStore containing the public key for the SSL certificate, so that it is able to validate it when presented by the server. The server ships with a script to create an example self-signed SSL certificate, and store the relevant entries in a KeyStore and matching TrustStore. This script can serve as a guide on how to use the Java Keytool security utility to manipulate your own stores, and more information can be found in the JSSE Reference Guide: http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores

Supplying the necessary details to the console is performed by setting the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword environment variables when starting it. This can be done at the command line, but the preferred option is to set the configuration within the qpidmc.ini launcher configuration file for repeated usage. This file is equipped with a template to ease configuration, this should be uncommented and edited to suit your needs. It can be found in the root of the console releases for Windows, and Linux. For Mac OS X the file is located within the consoles .app application bundle, and to locate and edit it you must select 'Show Package Contents' when accessing the context menu of the application, then browse to the Contents/MacOS sub folder to locate the file.


JMXMP configuration


Older releases of the Qpid Java server can make use of the Java Management Extensions Messaging Protocol (JMXMP) to provide protection for their JMX connections. This occurs when the server has its main configuration set with the management 'security-enabled' property set to true.

In order to connect to this configuration of server, the console needs an additional library that is not included within the Java SE platform and cannot be distributed with the console due to licensing restrictions.

You can download the JMX Remote API 1.0.1_04 Reference Implementation from the Sun website here. The included jmxremote-1_0_1-bin/lib/jmxremote_optional.jar file must be added to the plugins/jmxremote.sasl_1.0.1 folder of the console release (again, in Mac OS X you will need to select 'Show package contents' from the context menu whilst selecting the management console bundle in order to reveal the inner file tree).

Following this the console will automatically load the JMX Remote Optional classes and negotiate the SASL authentication profile type when encountering a JMXMP enabled Qpid Java server.

 Managing Server Connections



Main Toolbar


The main toolbar of the console can be seen in the image below. The left most buttons respectively allow for adding a new server connection, reconnecting to an existing server selected in the co

[CONF] Apache Qpid > Qpid Java Build How To

2009-11-12 Thread confluence







Qpid Java Build How To
Page
commented by  Bruno Matos



   Hello,

I think that the trunk version only compiles with JDK 6. Please correct me if I'm wrong.




   
Change Notification Preferences
   
   View Online
  |
   Reply To This
   








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



svn commit: r835392 - /qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp

2009-11-12 Thread tross
Author: tross
Date: Thu Nov 12 14:35:39 2009
New Revision: 835392

URL: http://svn.apache.org/viewvc?rev=835392&view=rev
Log:
QPID-2179 - example qmf-agent occasionally crashes on shutdown
Committed patch from Ken Giusti

Modified:
qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp

Modified: qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp?rev=835392&r1=835391&r2=835392&view=diff
==
--- qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp (original)
+++ qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp Thu Nov 12 14:35:39 2009
@@ -36,6 +36,8 @@
 
 #include 
 
+static bool running = true;
+
 using namespace std;
 using qpid::management::ManagementAgent;
 using qpid::management::ManagementObject;
@@ -101,7 +103,7 @@
 void CoreClass::doLoop()
 {
 // Periodically bump a counter to provide a changing statistical value
-while (1) {
+while (running) {
 qpid::sys::sleep(1);
 mgmtObject->inc_count();
 mgmtObject->set_state("IN_LOOP");
@@ -155,8 +157,7 @@
 
 void shutdown(int)
 {
-delete singleton;
-exit(0);
+running = false;
 }
 
 int main_int(int argc, char** argv)
@@ -188,6 +189,9 @@
 
 core1.doLoop();
 
+// done, cleanup and exit
+delete singleton;
+
 return 0;
 }
 



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



[CONF] Apache Qpid > AMQP C++ Messaging Client

2009-11-12 Thread confluence







 AMQP C++ Messaging Client
 Page edited by Jonathan Robie

 
  
 
 User Guides


	C++ Client API (AMQP 0-10) 



Examples


	Examples 
	Running the C++ Examples 



 
 
   
Change Notification Preferences
   

   View Online
   |
   View Change
  |
   Add Comment








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



[CONF] Apache Qpid > Qpid Java Build How To

2009-11-12 Thread confluence







Qpid Java Build How To
Comment removed by  Jonathan Robie



Hello,

I think that the trunk version only compiles with JDK 6. Please correct me if I'm wrong.



   
Change Notification Preferences
   








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



[CONF] Apache Qpid > Download

2009-11-12 Thread confluence







 Download
 Page edited by Jonathan Robie

 
  
 
 Production Releases

These releases are well tested and appropriate for production use. 0.5 is the latest release of Qpid.

Qpid supports the latest version of AMQP 0-10, and some components also the AMQP 0-8 and 0-9, earlier versions. The Java Broker and Client provide protocol negotiation. Other versions can be found here

For details on cross component compatibility among releases, see: AMQP Release Compatibility for Qpid

If you have any questions about these releases, please mail the user list user list

QpidComponents.org 

QpidComponents.org provides further components for Apache Qpid, including both persistence and management tools. These components are open source, but are not developed as part of the Apache Qpid project due to licensing or other restrictions.

0.5 Release

Multiple Component Packages



 Component 
 Download 
 AMQP 0-10 
 AMQP 0-8/0-9 


 Full release & keys 
 http://www.apache.org/dist/qpid/0.5/ 
 Y 
 Y 


 C++ broker & client 
 http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz 
 Y 
 


 Java broker, client & tools 
 http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz 
 client 
 Y 



Single Component Package

Broker


 Language 
 Download 
 AMQP 0-10 
 AMQP 0-8/0-9 


 Java 
 http://www.apache.org/dist/qpid/0.5/qpid-java-broker-0.5.tar.gz 
 
 Y 



Client


 Language 
 Download 
 AMQP 0-10 
 AMQP 0-8/0-9 


 C# (.NET, WCF, Excel) 0-10 client (C++ Broker Compatible) 
 http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-10-0.5.zip 
 Y 
 


 C# (.NET) 0-8 client (Java Broker Compatible) 
 http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-8-0.5.zip 
 
 Y 


 Java 
 http://www.apache.org/dist/qpid/0.5/qpid-java-client-0.5.tar.gz 
 Y 
 Y 


 Python 
 http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz 
 Y 
 Y 


 Ruby 
 http://www.apache.org/dist/qpid/0.5/qpid-ruby-0.5.tar.gz 
 Y 
 Y 



Management tools

C++ broker management


 Component 
 Download 
 AMQP 0-10 


 cmd line (packaged with python) 
 http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz 
 Y 


 QMan JMX bridge, WS-DM 
 http://www.apache.org/dist/qpid/0.5/qpid-management-client-0.5.tar.gz 
 Y 



Java broker management


 Component 
 Download 


 Eclipse RCP client  
 Linux x86 Linux x86_64 Mac OS X Windows x86 


 Command line interface 
 http://www.apache.org/dist/qpid/0.5/qpid-management-tools-qpid-cli-0.5.tar.gz 




Contributed C++ Packages

Pre-built Linux Packages

Fedora 8, 9, 10

On Fedora, Qpid can be installed using yum. Because Java RPMs are not yet available in Fedora repos, the Java client is not in these distributions.

To install the server:


# yum install qpidd


To install C++ and Python clients:


# yum install qpidc-devel




# yum install amqp python-qpid


To install documentation:


# yum install rhm-docs


To install persistence using an external store module:


# yum install rhm



Windows Installer

The Windows installer is available from http://www.apache.org/dist/qpid/0.5-windows/qpidc-0.5.msi. It is built from the 0.5 C++ broker and client source distribution listed above. It has been tested for Windows XP SP2 and above.

The Windows executables require the Visual C++ 2008 SP1 run-time components. If the Visual C++ 2008 SP1 runtime is not available, the Qpid broker will not execute. If you intend to run the broker and Visual C++ 2008 is not installed, you must install the Visual C++ 2008 SP1 Redistributable. Please see http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en for download and installation instructions.

If you intend to develop Qpid client applications using this kit, you should install Boost version 1.35 (please be sure to select VC9 support when installing) in addition to Visual Studio 2008 SP1.

Source Code Repository

The latest version of the code is always available in the Source Repository.
 
 
   
Change Notification Preferences
   

   View Online
   |
   View Change
  |
   Add Comment








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



[CONF] Apache Qpid > Download

2009-11-12 Thread confluence







 Download
 Page edited by Jonathan Robie

 
  
 
 Production Releases

These releases are well tested and appropriate for production use. 0.5 is the latest release of Qpid.

Qpid supports the latest version of AMQP 0-10, and some components also the AMQP 0-8 and 0-9, earlier versions. The Java Broker and Client provide protocol negotiation. Other versions can be found here

For details on cross component compatibility among releases, see: AMQP Release Compatibility for Qpid

If you have any questions about these releases, please mail the user list user list


0.5 Release

Multiple Component Packages



 Component 
 Download 
 AMQP 0-10 
 AMQP 0-8/0-9 


 Full release & keys 
 http://www.apache.org/dist/qpid/0.5/ 
 Y 
 Y 


 C++ broker & client 
 http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz 
 Y 
 


 Java broker, client & tools 
 http://www.apache.org/dist/qpid/0.5/qpid-java-0.5.tar.gz 
 client 
 Y 



Single Component Package

Broker


 Language 
 Download 
 AMQP 0-10 
 AMQP 0-8/0-9 


 Java 
 http://www.apache.org/dist/qpid/0.5/qpid-java-broker-0.5.tar.gz 
 
 Y 



Client


 Language 
 Download 
 AMQP 0-10 
 AMQP 0-8/0-9 


 C# (.NET, WCF, Excel) 0-10 client (C++ Broker Compatible) 
 http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-10-0.5.zip 
 Y 
 


 C# (.NET) 0-8 client (Java Broker Compatible) 
 http://www.apache.org/dist/qpid/0.5/qpid-dotnet-0-8-0.5.zip 
 
 Y 


 Java 
 http://www.apache.org/dist/qpid/0.5/qpid-java-client-0.5.tar.gz 
 Y 
 Y 


 Python 
 http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz 
 Y 
 Y 


 Ruby 
 http://www.apache.org/dist/qpid/0.5/qpid-ruby-0.5.tar.gz 
 Y 
 Y 



Management tools

C++ broker management


 Component 
 Download 
 AMQP 0-10 


 cmd line (packaged with python) 
 http://www.apache.org/dist/qpid/0.5/qpid-python-0.5.tar.gz 
 Y 


 QMan JMX bridge, WS-DM 
 http://www.apache.org/dist/qpid/0.5/qpid-management-client-0.5.tar.gz 
 Y 



Java broker management


 Component 
 Download 


 Eclipse RCP client  
 Linux x86 Linux x86_64 Mac OS X Windows x86 


 Command line interface 
 http://www.apache.org/dist/qpid/0.5/qpid-management-tools-qpid-cli-0.5.tar.gz 



QpidComponents.org 

QpidComponents.org provides further components for Apache Qpid, including both persistence and management tools. These components are open source, but are not developed as part of the Apache Qpid project due to licensing or other restrictions.

Contributed C++ Packages

Pre-built Linux Packages

Fedora 8, 9, 10

On Fedora, Qpid can be installed using yum. Because Java RPMs are not yet available in Fedora repos, the Java client is not in these distributions.

To install the server:


# yum install qpidd


To install C++ and Python clients:


# yum install qpidc-devel




# yum install amqp python-qpid


To install documentation:


# yum install rhm-docs


To install persistence using an external store module:


# yum install rhm



Windows Installer

The Windows installer is available from http://www.apache.org/dist/qpid/0.5-windows/qpidc-0.5.msi. It is built from the 0.5 C++ broker and client source distribution listed above. It has been tested for Windows XP SP2 and above.

The Windows executables require the Visual C++ 2008 SP1 run-time components. If the Visual C++ 2008 SP1 runtime is not available, the Qpid broker will not execute. If you intend to run the broker and Visual C++ 2008 is not installed, you must install the Visual C++ 2008 SP1 Redistributable. Please see http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en for download and installation instructions.

If you intend to develop Qpid client applications using this kit, you should install Boost version 1.35 (please be sure to select VC9 support when installing) in addition to Visual Studio 2008 SP1.

Source Code Repository

The latest version of the code is always available in the Source Repository.
 
 
   
Change Notification Preferences
   

   View Online
   |
   View Change
  |
   Add Comment








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



svn commit: r835488 - in /qpid/trunk/qpid/python/qpid: messaging.py tests/messaging.py

2009-11-12 Thread rhs
Author: rhs
Date: Thu Nov 12 18:33:25 2009
New Revision: 835488

URL: http://svn.apache.org/viewvc?rev=835488&view=rev
Log:
removed listeners in favor of next_receiver

Modified:
qpid/trunk/qpid/python/qpid/messaging.py
qpid/trunk/qpid/python/qpid/tests/messaging.py

Modified: qpid/trunk/qpid/python/qpid/messaging.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging.py?rev=835488&r1=835487&r2=835488&view=diff
==
--- qpid/trunk/qpid/python/qpid/messaging.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging.py Thu Nov 12 18:33:25 2009
@@ -295,10 +295,6 @@
 self.closed = False
 
 self._lock = connection._lock
-self.running = True
-self.thread = Thread(target = self.run)
-self.thread.setDaemon(True)
-self.thread.start()
 
   def __repr__(self):
 return "" % self.name
@@ -342,8 +338,8 @@
   @synchronized
   def receiver(self, source, **options):
 """
-Creates a receiver that may be used to actively fetch or to listen
-for the arrival of L{Messages} from the specified source.
+Creates a receiver that may be used to fetch L{Messages}
+from the specified source.
 
 @type source: str
 @param source: the source of L{Messages}
@@ -392,6 +388,13 @@
 return None
 
   @synchronized
+  def next_receiver(self, timeout=None):
+if self._ewait(lambda: self.incoming, timeout):
+  return self.incoming[0]._receiver
+else:
+  raise Empty
+
+  @synchronized
   def acknowledge(self, message=None, sync=True):
 """
 Acknowledge the given L{Message}. If message is None, then all
@@ -465,29 +468,8 @@
 """
 for rcv in self.receivers:
   rcv.stop()
-# TODO: think about stopping individual receivers in listen mode
-self._wait(lambda: self._peek(self._pred) is None)
 self.started = False
 
-  def _pred(self, m):
-return m._receiver.listener is not None
-
-  @synchronized
-  def run(self):
-self.running = True
-try:
-  while True:
-msg = self._get(self._pred)
-if msg is None:
-  break;
-else:
-  msg._receiver.listener(msg)
-  if self._peek(self._pred) is None:
-self.connection._waiter.notifyAll()
-finally:
-  self.running = False
-  self.connection._waiter.notifyAll()
-
   @synchronized
   def close(self):
 """
@@ -498,10 +480,7 @@
 
 self.closing = True
 self._wakeup()
-self._ewait(lambda: self.closed and not self.running)
-while self.thread.isAlive():
-  self.thread.join(3)
-self.thread = None
+self._ewait(lambda: self.closed)
 # XXX: should be able to express this condition through API calls
 self._ewait(lambda: not self.outgoing and not self.acked)
 self.connection._remove_session(self)
@@ -636,8 +615,7 @@
 
   """
   Receives incoming messages from a remote source. Messages may be
-  actively fetched with L{fetch} or a listener may be installed with
-  L{listen}.
+  fetched with L{fetch}.
   """
 
   def __init__(self, session, index, source, options, started):
@@ -659,7 +637,6 @@
 self.linked = False
 self.closing = False
 self.closed = False
-self.listener = None
 self._lock = self.session._lock
 
   def _wakeup(self):
@@ -694,16 +671,6 @@
 else:
   return self.capacity
 
-  @synchronized
-  def listen(self, listener=None):
-"""
-Sets the message listener for this receiver.
-
-@type listener: callable
-@param listener: a callable object to be notified on message arrival
-"""
-self.listener = listener
-
   def _pred(self, msg):
 return msg._receiver == self
 

Modified: qpid/trunk/qpid/python/qpid/tests/messaging.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/tests/messaging.py?rev=835488&r1=835487&r2=835488&view=diff
==
--- qpid/trunk/qpid/python/qpid/tests/messaging.py (original)
+++ qpid/trunk/qpid/python/qpid/tests/messaging.py Thu Nov 12 18:33:25 2009
@@ -228,6 +228,35 @@
 assert msg.content == content
 self.ssn.acknowledge(msg)
 
+  def testNextReceiver(self):
+ADDR = 'test-next-rcv-queue {create: always}'
+rcv1 = self.ssn.receiver(ADDR, capacity=UNLIMITED)
+rcv2 = self.ssn.receiver(ADDR, capacity=UNLIMITED)
+rcv3 = self.ssn.receiver(ADDR, capacity=UNLIMITED)
+
+# XXX: this won't work if it is before the receiver creation
+self.ssn.start()
+
+snd = self.ssn.sender(ADDR)
+
+msgs = []
+for i in range(10):
+  content = self.content("testNextReceiver", i)
+  snd.send(content)
+  msgs.append(content)
+
+fetched = []
+try:
+  while True:
+rcv = self.ssn.next_receiver(timeout=self.delay())
+assert rcv in (rcv1, rcv2, rcv3)
+assert rcv.pending() > 0
+fetched.append(rcv.fetch().content)
+except Empty:
+  pass
+assert msgs == fetched, "

[CONF] Apache Qpid > Persistent Cluster Restart Design Note

2009-11-12 Thread confluence







 Persistent Cluster Restart Design Note
 Page edited by Alan Conway

 
  
 
 Persistent clusters.

A cluster has either all transient or all persistent members, mixed clusters are not allowed.

Persistent restart scenarios:


	first run of persistent cluster, all members have empty stores.
	persistent member crashes is re started - re-joins running cluster
	automatic restart after orderly shutdown of persistent cluster
	manual recovery after total cluster failure of persistent cluster



Other requirements:


	cluster initialization: wait for N initial members before going active.
	enforce consistency of broker options that need to be identical across cluster



Wait for N

New option: cluster-wait-for N. Wait for at least N initial members before going active.


	guarantees that clients will not be served till N members are active.
	check consistency of all N members (options, store state) before starting.
	members with clean store can restore from store, don't need an update.



Can be used with transient and persistent clusters.


Transient cluster

Initialization


	Wait for N initial members
	Verify options are consistent for all members or abort.
	All members become active.




Joining



	Check options are consistent with cluster.
	Get update from an active broker, become active.





Persistent cluster

Store statess on broker start-up:


	empty: not used before.
	clean: has state, was shut down by admin. Has intial and final UUIDs
	dirty: has state, not shut down by admin. Has initial UUID.



Initial UUID is stored on the first run of a persistent cluster.  Used to ensure members are part of the same cluster.

Final UUID is stored at administrative shut-down of the cluster. Used to ensure clean stores are from the same shut-down event.

Initialization



	Wait for N initial members
	Verify options are consistent for all members or abort.
	Verify valid store states or abort (see below)
	Members with empty/dirty stores get update from clean member.



All empty is a valid store state: all members record the same initial UUID and go active.

If any are non empty then


	at least one store  must be clean
	all clean stores must have same final UUID.
	all clean and dirty stores must have same initial UUID.



All clean members restore from stores. All empty members set the initial UUID from the cluster. All dirty/empty members get an update from a clean member.


Joining

If the new member has a non-empty store, the initial UUID must match the cluster. The new member gets an update from the cluster.


Manual Recovery

If the entire cluster fails then manual recovery is required.

While running brokers will peridiocally (on every membership change and at some configured time interval) write a sequence number to disk.

Provide tools to examine broker data directories and determine if they belong to the same cluster (same initial UUID) and if so which is the latest based on the sequence number.

Recovery procedure is to mark the latest store as clean and restart the cluster.




 
 
   
Change Notification Preferences
   

   View Online
   |
   View Change
  |
   Add Comment








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



svn commit: r835504 - in /qpid/trunk/qpid/python: qmf/console.py qpid/managementdata.py

2009-11-12 Thread nsantos
Author: nsantos
Date: Thu Nov 12 19:14:49 2009
New Revision: 835504

URL: http://svn.apache.org/viewvc?rev=835504&view=rev
Log:
replace gethostbyname() with getaddrinfo(), which supports IPv6 addresses and 
is thread-safe

Modified:
qpid/trunk/qpid/python/qmf/console.py
qpid/trunk/qpid/python/qpid/managementdata.py

Modified: qpid/trunk/qpid/python/qmf/console.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qmf/console.py?rev=835504&r1=835503&r2=835504&view=diff
==
--- qpid/trunk/qpid/python/qmf/console.py (original)
+++ qpid/trunk/qpid/python/qmf/console.py Thu Nov 12 19:14:49 2009
@@ -97,12 +97,12 @@
 class BrokerURL(URL):
   def __init__(self, text):
 URL.__init__(self, text)
-socket.gethostbyname(self.host)
 if self.port is None:
   if self.scheme == URL.AMQPS:
 self.port = 5671
   else:
 self.port = 5672
+socket.getaddrinfo(self.host, self.port)[0][4][0]
 self.authName = None
 self.authPass = None
 if self.user:
@@ -114,7 +114,7 @@
 return self.host + ":" + str(self.port)
 
   def match(self, host, port):
-return socket.gethostbyname(self.host) == socket.gethostbyname(host) and 
self.port == port
+return socket.getaddrinfo(self.host, self.port)[0][4] == 
socket.gethostbyname(host, port)[0][4]
 
 class Object(object):
   """ This class defines a 'proxy' object representing a real managed object 
on an agent.

Modified: qpid/trunk/qpid/python/qpid/managementdata.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/managementdata.py?rev=835504&r1=835503&r2=835504&view=diff
==
--- qpid/trunk/qpid/python/qpid/managementdata.py (original)
+++ qpid/trunk/qpid/python/qpid/managementdata.py Thu Nov 12 19:14:49 2009
@@ -48,9 +48,9 @@
 if not match: raise ValueError("'%s' is not a valid broker url" % (text))
 user, password, host, port = match.groups()
 
-self.host = socket.gethostbyname (host)
 if port: self.port = int(port)
 else: self.port = 5672
+self.host = socket.getaddrinfo(host, self.port)[0][4][0]
 self.username = user or "guest"
 self.password = password or "guest"
 



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



svn commit: r835509 - /qpid/trunk/qpid/python/qpid/driver.py

2009-11-12 Thread rhs
Author: rhs
Date: Thu Nov 12 19:19:44 2009
New Revision: 835509

URL: http://svn.apache.org/viewvc?rev=835509&view=rev
Log:
switched SUBJECT and TO to use a qpid prefix

Modified:
qpid/trunk/qpid/python/qpid/driver.py

Modified: qpid/trunk/qpid/python/qpid/driver.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/driver.py?rev=835509&r1=835508&r2=835509&view=diff
==
--- qpid/trunk/qpid/python/qpid/driver.py (original)
+++ qpid/trunk/qpid/python/qpid/driver.py Thu Nov 12 19:19:44 2009
@@ -123,6 +123,9 @@
 EMPTY_DP = DeliveryProperties()
 EMPTY_MP = MessageProperties()
 
+SUBJECT = "qpid.subject"
+TO = "qpid.to"
+
 class Driver:
 
   def __init__(self, connection):
@@ -739,11 +742,11 @@
 if msg.subject is not None:
   if mp.application_headers is None:
 mp.application_headers = {}
-  mp.application_headers["subject"] = msg.subject
+  mp.application_headers[SUBJECT] = msg.subject
 if msg.to is not None:
   if mp.application_headers is None:
 mp.application_headers = {}
-  mp.application_headers["to"] = msg.to
+  mp.application_headers[TO] = msg.to
 if msg.durable:
   dp.delivery_mode = delivery_mode.persistent
 enc, dec = get_codec(msg.content_type)
@@ -787,8 +790,8 @@
 msg = Message(content)
 msg.id = mp.message_id
 if ap is not None:
-  msg.to = ap.get("to")
-  msg.subject = ap.get("subject")
+  msg.to = ap.get(TO)
+  msg.subject = ap.get(SUBJECT)
 msg.user_id = mp.user_id
 if mp.reply_to is not None:
   msg.reply_to = reply_to2addr(mp.reply_to)



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



svn commit: r835537 - /qpid/trunk/qpid/python/qmf/console.py

2009-11-12 Thread nsantos
Author: nsantos
Date: Thu Nov 12 20:52:11 2009
New Revision: 835537

URL: http://svn.apache.org/viewvc?rev=835537&view=rev
Log:
replace gethostbyname() with getaddrinfo(), which supports IPv6 addresses and 
is thread-safe; had missed one instance on previous checkin

Modified:
qpid/trunk/qpid/python/qmf/console.py

Modified: qpid/trunk/qpid/python/qmf/console.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qmf/console.py?rev=835537&r1=835536&r2=835537&view=diff
==
--- qpid/trunk/qpid/python/qmf/console.py (original)
+++ qpid/trunk/qpid/python/qmf/console.py Thu Nov 12 20:52:11 2009
@@ -114,7 +114,7 @@
 return self.host + ":" + str(self.port)
 
   def match(self, host, port):
-return socket.getaddrinfo(self.host, self.port)[0][4] == 
socket.gethostbyname(host, port)[0][4]
+return socket.getaddrinfo(self.host, self.port)[0][4] == 
socket.getaddrinfo(host, port)[0][4]
 
 class Object(object):
   """ This class defines a 'proxy' object representing a real managed object 
on an agent.



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



svn commit: r835547 - /qpid/trunk/qpid/cpp/src/tests/cluster_tests.py

2009-11-12 Thread aconway
Author: aconway
Date: Thu Nov 12 21:13:00 2009
New Revision: 835547

URL: http://svn.apache.org/viewvc?rev=835547&view=rev
Log:
Made cluster_tests.py ClusterTests.test_failover configurable to run for any 
length of time.

Also incorporated error generators to give a good stress test.

Modified:
qpid/trunk/qpid/cpp/src/tests/cluster_tests.py

Modified: qpid/trunk/qpid/cpp/src/tests/cluster_tests.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/cluster_tests.py?rev=835547&r1=835546&r2=835547&view=diff
==
--- qpid/trunk/qpid/cpp/src/tests/cluster_tests.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/cluster_tests.py Thu Nov 12 21:13:00 2009
@@ -57,7 +57,7 @@
 
 # Original cluster will all be killed so expect exit with failure
 cluster = self.cluster(3, expect=EXPECT_EXIT_FAIL)
-
+for b in cluster: ErrorGenerator(b)
 
 # Start sender and receiver threads
 cluster[0].declare_queue("test-queue")
@@ -67,29 +67,18 @@
 sender.start()
 
 # Kill original brokers, start new ones.
-for i in range(3):
+endtime = time.time() + (int(self.config.defines.get("DURATION") or 3))
+i = 0
+while time.time() < endtime:
+print time.time(), endtime
 cluster[i].kill()
-b = cluster.start()
+i += 1
+b = cluster.start(expect=EXPECT_EXIT_FAIL)
+ErrorGenerator(b)
 time.sleep(1)
-
 sender.stop()
 receiver.stop(sender.sent)
-
-def send_receive_verify(self, b1, b2, queue, msgs):
-b1.send_messages(queue, msgs)
-self.assertEqual(msgs, [ m.content for m in 
b2.get_messages(queue,len(msgs))])
-
-def test_error_storm(self):
-"""Verify cluster behaves with clients generating a lot of errors."""
-cluster = self.cluster(3)
-errgen = [ ErrorGenerator(b) for b in cluster ]
-msgs = [ str(i) for i in range(10) ]
-self.send_receive_verify(cluster[0], cluster[1], "q", msgs)
-self.send_receive_verify(cluster[1], cluster[2], "q", msgs)
-for i in range(3):
-cluster.start()
-self.send_receive_verify(cluster[1], cluster[2], "q", msgs)
-
+for i in range(i, len(cluster)): cluster[i].kill()
 
 class ClusterStoreTests(BrokerTest):
 """



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



svn commit: r835550 [5/5] - in /qpid/trunk/qpid: cpp/ cpp/bindings/sasl/ extras/ extras/sasl/ extras/sasl/build-aux/ extras/sasl/cyrus/ extras/sasl/include/ extras/sasl/m4/ extras/sasl/python/ extras/

2009-11-12 Thread tross
Added: qpid/trunk/qpid/extras/sasl/m4/ltoptions.m4
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/sasl/m4/ltoptions.m4?rev=835550&view=auto
==
--- qpid/trunk/qpid/extras/sasl/m4/ltoptions.m4 (added)
+++ qpid/trunk/qpid/extras/sasl/m4/ltoptions.m4 Thu Nov 12 21:16:59 2009
@@ -0,0 +1,368 @@
+# Helper functions for option handling.-*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# --
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+_LT_MANGLE_DEFUN([$1], [$2]),
+[m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# 
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# ---
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+   [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# 
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+[_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+  [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+## - ##
+## Macros to handle LT_INIT options. ##
+## - ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# ---
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# --
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# -
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS]

svn commit: r835550 [3/5] - in /qpid/trunk/qpid: cpp/ cpp/bindings/sasl/ extras/ extras/sasl/ extras/sasl/build-aux/ extras/sasl/cyrus/ extras/sasl/include/ extras/sasl/m4/ extras/sasl/python/ extras/

2009-11-12 Thread tross
Added: qpid/trunk/qpid/extras/sasl/configure.ac
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/sasl/configure.ac?rev=835550&view=auto
==
--- qpid/trunk/qpid/extras/sasl/configure.ac (added)
+++ qpid/trunk/qpid/extras/sasl/configure.ac Thu Nov 12 21:16:59 2009
@@ -0,0 +1,317 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl This file is free software; as a special exception the author gives
+dnl unlimited permission to copy and/or distribute it, with or without
+dnl modifications, as long as this notice is preserved.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+dnl
+dnl When updating the name/version number here, also update it in
+dnl src/qpid/Version.h
+
+AC_INIT([saslwrapper], [0.1], [...@qpid.apache.org])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
+
+# Minimum Autoconf version required.
+AC_PREREQ(2.59)
+
+AC_CONFIG_HEADERS([config.h])
+
+AC_PROG_CC_STDC
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_USE_SYSTEM_EXTENSIONS
+AC_LANG([C++]) 
+
+# Check for optional use of help2man
+AC_CHECK_PROG([HELP2MAN], [help2man], [help2man])
+AC_ARG_WITH([help2man],
+  [AS_HELP_STRING([--with-help2man], [Use help2man to generate man pages.])],
+  [case "$withval" in
+yes) test -z "$HELP2MAN" && AC_MSG_ERROR([help2man not found.]) ;;
+no) HELP2MAN="" ;;
+*)   AC_MSG_ERROR([Bad value ${withval} for --with-help2man.]) ;;
+   esac])
+AM_CONDITIONAL([HAVE_HELP2MAN], [test -n "$HELP2MAN"])
+
+# Check for optional use of doxygen
+AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
+AC_ARG_WITH([doxygen],
+  [AS_HELP_STRING([--with-doxygen], [Use doxygen to generate API 
documentation.])],
+  [case "$withval" in
+yes) test -z "$DOXYGEN" && AC_MSG_ERROR([doxygen not found.]) ;;
+no) DOXYGEN="" ;;
+*)   AC_MSG_ERROR([Bad value ${withval} for --with-doxygen.]) ;;
+   esac])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
+
+AC_ARG_ENABLE(warnings,
+[  --enable-warnings   turn on lots of compiler warnings (recommended)],
+[case "${enableval}" in
+   yes|no) ;;
+   *)  AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;;
+ esac],
+ [enableval=yes])
+
+# Set up for gcc as compiler
+if test x$GXX = xyes; then
+   # Warnings: Enable as many as possible, keep the code clean. Please
+   # do not disable warnings or remove -Werror without discussing on
+   # qpid-dev list.
+   #
+   # The following warnings are deliberately omitted, they warn on valid 
code.
+   # -Wunreachable-code -Wpadded -Winline
+   # -Wshadow - warns about boost headers.
+   if test "${enableval}" = yes; then
+   gl_COMPILER_FLAGS(-Werror)
+   gl_COMPILER_FLAGS(-pedantic)
+   gl_COMPILER_FLAGS(-Wall)
+   gl_COMPILER_FLAGS(-Wextra)
+   gl_COMPILER_FLAGS(-Wno-shadow)
+   gl_COMPILER_FLAGS(-Wpointer-arith)
+   gl_COMPILER_FLAGS(-Wcast-qual)
+   gl_COMPILER_FLAGS(-Wcast-align)
+   gl_COMPILER_FLAGS(-Wno-long-long)
+   gl_COMPILER_FLAGS(-Wvolatile-register-var)
+   gl_COMPILER_FLAGS(-Winvalid-pch)
+   gl_COMPILER_FLAGS(-Wno-system-headers)
+   gl_COMPILER_FLAGS(-Woverloaded-virtual) 
+   AC_SUBST([WARNING_CFLAGS], [$COMPILER_FLAGS])
+   AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for 
lint.])
+   COMPILER_FLAGS=
+   fi
+else
+   AC_CHECK_DECL([__SUNPRO_CC], [SUNCC=yes], [SUNCC=no])
+   
+   # Set up for sun CC compiler
+   if test x$SUNCC = xyes; then
+   if test "${enableval}" = yes; then
+   WARNING_FLAGS=+w
+   fi
+   CXXFLAGS="$CXXFLAGS -library=stlport4 -mt"
+   LD="$CXX"
+   LDFLAGS="$LDFLAGS -library=stlport4 -mt"
+   AC_SUBST([SUNCC_RUNTIME_LIBS], [-lCrun])
+   fi
+fi
+
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+AC_SUBST([LIBTOOL_DEPS])
+
+# For libraries (libcommon) that use dlopen, dlerror, etc.,
+# test whether we need to link with -ldl.
+gl_saved_libs=$LIBS
+  AC_SEARCH_LIBS(dlopen, [dl],
+[test "$ac_cv_search_dlopen" = "none required" ||
+ LIB_DLOPEN=$ac_cv_search_dlopen])
+  AC_SUBST([LIB_DLOPEN])
+LIBS=$gl_saved_libs
+
+# Set the argument to be used in "libtool -version-info ARG".
+QPID_CURRENT=2
+QPID_REVISION=0
+QPID_AGE=0
+LIBTOOL_VERSION_INFO_ARG=$QPID_CURRENT:$QPID_REVISION:$QPID_AGE
+AC_SUBST(LIBTOOL_VERSION_INFO_ARG)
+
+gl_CLOCK_TIME
+
+# Enable Valgrind  
+AC_ARG_ENABLE([valgrind],
+  [AS_HELP_STRING([--enable-valgrind],
+[run valgrind memory checker on tests, if available (default yes)])],
+  [case $enableval in
+yes|no) enable_VALGRIND=$enableval;;
+*) AC

svn commit: r835652 [3/3] - in /qpid/trunk/qpid/cpp: ./ docs/api/ examples/ examples/direct/ examples/failover/ examples/fanout/ examples/pub-sub/ examples/qmf-agent/ examples/qmf-console/ examples/re

2009-11-12 Thread shuston
Modified: 
qpid/trunk/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj?rev=835652&r1=835651&r2=835652&view=diff
==
--- qpid/trunk/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj 
(original)
+++ qpid/trunk/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj Fri 
Nov 13 00:13:42 2009
@@ -1,4 +1,24 @@
 
+
 



http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/xml-exchange/CMakeLists.txt?rev=835652&r1=835651&r2=835652&view=diff
==
--- qpid/trunk/qpid/cpp/examples/xml-exchange/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/examples/xml-exchange/CMakeLists.txt Fri Nov 13 
00:13:42 2009
@@ -17,6 +17,8 @@
 # under the License.
 #
 
+if (BUILD_XML)
 add_example(xml-exchange declare_queues)
 add_example(xml-exchange xml_producer)
 add_example(xml-exchange listener)
+endif (BUILD_XML)

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=835652&r1=835651&r2=835652&view=diff
==
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Fri Nov 13 00:13:42 2009
@@ -737,10 +737,10 @@
 install (TARGETS qpidd RUNTIME
  DESTINATION ${QPID_INSTALL_BINDIR}
  COMPONENT ${QPID_COMPONENT_BROKER})
-if (CPACK_NSIS)
+if (CPACK_GENERATOR STREQUAL "NSIS")
 set (CPACK_NSIS_MENU_LINKS
  "qpidd" "Start Qpid Broker")
-endif (CPACK_NSIS)
+endif (CPACK_GENERATOR STREQUAL "NSIS")
 
 # QMF library
 # Library Version Information (CURRENT.REVISION.AGE):



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



svn commit: r835653 [2/2] - /qpid/trunk/qpid/cpp/examples/messaging/

2009-11-12 Thread shuston
Added: qpid/trunk/qpid/cpp/examples/messaging/messaging_topic_listener.vcproj
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/messaging/messaging_topic_listener.vcproj?rev=835653&view=auto
==
--- qpid/trunk/qpid/cpp/examples/messaging/messaging_topic_listener.vcproj 
(added)
+++ qpid/trunk/qpid/cpp/examples/messaging/messaging_topic_listener.vcproj Fri 
Nov 13 00:16:13 2009
@@ -0,0 +1,411 @@
+
+
+
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+

Added: qpid/trunk/qpid/cpp/examples/messaging/messaging_topic_receiver.vcproj
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/messaging/messaging_topic_receiver.vcproj?rev=835653&view=auto
==
--- qpid/trunk/qpid/cpp/examples/messaging/messaging_topic_receiver.vcproj 
(added)
+++ qpid/trunk/qpid/cpp/examples/messaging/messaging_topic_receiver.vcproj Fri 
Nov 13 00:16:13 2009
@@ -0,0 +1,411 @@
+
+
+
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+

svn commit: r835656 - /qpid/trunk/qpid/python/tests_0-10/persistence.py

2009-11-12 Thread shuston
Author: shuston
Date: Fri Nov 13 00:18:08 2009
New Revision: 835656

URL: http://svn.apache.org/viewvc?rev=835656&view=rev
Log:
No need to import from testrunner; allows this to run on Windows as well.

Modified:
qpid/trunk/qpid/python/tests_0-10/persistence.py

Modified: qpid/trunk/qpid/python/tests_0-10/persistence.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/tests_0-10/persistence.py?rev=835656&r1=835655&r2=835656&view=diff
==
--- qpid/trunk/qpid/python/tests_0-10/persistence.py (original)
+++ qpid/trunk/qpid/python/tests_0-10/persistence.py Fri Nov 13 00:18:08 2009
@@ -17,7 +17,8 @@
 # under the License.
 #
 from qpid.datatypes import Message, RangedSet
-from qpid.testlib import testrunner, TestBase010
+#from qpid.testlib import testrunner, TestBase010
+from qpid.testlib import TestBase010
 
 class PersistenceTests(TestBase010):
 def test_delete_queue_after_publish(self):



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



svn commit: r835679 - in /qpid/trunk/qpid/cpp/examples: messaging/Makefile.am pub-sub/Makefile.am qmf-console/Makefile.am request-response/Makefile.am

2009-11-12 Thread shuston
Author: shuston
Date: Fri Nov 13 00:48:00 2009
New Revision: 835679

URL: http://svn.apache.org/viewvc?rev=835679&view=rev
Log:
Correct the changed vcproj files in the Makefile.am files; added the EXTRA_DIST 
for messaging/Makefile.am.

Modified:
qpid/trunk/qpid/cpp/examples/messaging/Makefile.am
qpid/trunk/qpid/cpp/examples/pub-sub/Makefile.am
qpid/trunk/qpid/cpp/examples/qmf-console/Makefile.am
qpid/trunk/qpid/cpp/examples/request-response/Makefile.am

Modified: qpid/trunk/qpid/cpp/examples/messaging/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/messaging/Makefile.am?rev=835679&r1=835678&r2=835679&view=diff
==
--- qpid/trunk/qpid/cpp/examples/messaging/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/examples/messaging/Makefile.am Fri Nov 13 00:48:00 2009
@@ -52,3 +52,15 @@
 
 map_receiver_SOURCES=map_receiver.cpp
 map_receiver_LDADD=$(CLIENT_LIB)
+
+EXTRA_DIST=  \
+   messaging_client.vcproj \
+   messaging_map_receiver.vcproj \
+   messaging_map_sender.vcproj \
+   messaging_queue_listener.vcproj \
+   messaging_queue_receiver.vcproj \
+   messaging_queue_sender.vcproj \
+   messaging_server.vcproj \
+   messaging_topic_listener.vcproj \
+   messaging_topic_receiver.vcproj \
+   messaging_topic_sender.vcproj

Modified: qpid/trunk/qpid/cpp/examples/pub-sub/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/pub-sub/Makefile.am?rev=835679&r1=835678&r2=835679&view=diff
==
--- qpid/trunk/qpid/cpp/examples/pub-sub/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/examples/pub-sub/Makefile.am Fri Nov 13 00:48:00 2009
@@ -42,5 +42,5 @@
verify_cpp_python.in \
verify_python_cpp\
verify_python_cpp.in \
-   pub_sub_topic_listener.vcproj \
-   pub_sub_topic_publisher.vcproj
+   pub-sub_topic_listener.vcproj \
+   pub-sub_topic_publisher.vcproj

Modified: qpid/trunk/qpid/cpp/examples/qmf-console/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/qmf-console/Makefile.am?rev=835679&r1=835678&r2=835679&view=diff
==
--- qpid/trunk/qpid/cpp/examples/qmf-console/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/examples/qmf-console/Makefile.am Fri Nov 13 00:48:00 
2009
@@ -48,7 +48,7 @@
$(MAKEDIST)
 
 EXTRA_DIST=  \
-   qmf_console_console.vcproj \
-   qmf_console_ping.vcproj \
-   qmf_console_printevents.vcproj \
-   qmf_console_queuestats.vcproj
+   qmf-console_console.vcproj \
+   qmf-console_ping.vcproj \
+   qmf-console_printevents.vcproj \
+   qmf-console_queuestats.vcproj

Modified: qpid/trunk/qpid/cpp/examples/request-response/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/request-response/Makefile.am?rev=835679&r1=835678&r2=835679&view=diff
==
--- qpid/trunk/qpid/cpp/examples/request-response/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/examples/request-response/Makefile.am Fri Nov 13 
00:48:00 2009
@@ -42,5 +42,5 @@
verify_cpp_python.in \
verify_python_cpp\
verify_python_cpp.in \
-   request_response_client.vcproj \
-   request_response_server.vcproj
+   request-response_client.vcproj \
+   request-response_server.vcproj



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



svn commit: r835746 - in /qpid/trunk/qpid/cpp/src/tests: declare_queues.cpp failover_soak.cpp replaying_sender.cpp resuming_receiver.cpp run_failover_soak

2009-11-12 Thread mgoulish
Author: mgoulish
Date: Fri Nov 13 05:37:54 2009
New Revision: 835746

URL: http://svn.apache.org/viewvc?rev=835746&view=rev
Log:
Make failover_soak and its children adjustable as to 
the number of brokers in the cluster, and the number 
of queues talking through the cluster during the test.

resuming_receiver.cpp and replaying_sender.cpp now
take command line args to control the queue name.

If more than 1 queue is desired, failover_soak.cpp 
will start up N queue, each with its own sender and
receiver.

Queue names are now made unique with the failover_soak
PID as part of their name.

Modified:
qpid/trunk/qpid/cpp/src/tests/declare_queues.cpp
qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp
qpid/trunk/qpid/cpp/src/tests/replaying_sender.cpp
qpid/trunk/qpid/cpp/src/tests/resuming_receiver.cpp
qpid/trunk/qpid/cpp/src/tests/run_failover_soak

Modified: qpid/trunk/qpid/cpp/src/tests/declare_queues.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/declare_queues.cpp?rev=835746&r1=835745&r2=835746&view=diff
==
--- qpid/trunk/qpid/cpp/src/tests/declare_queues.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/declare_queues.cpp Fri Nov 13 05:37:54 2009
@@ -25,46 +25,73 @@
 
 #include 
 #include 
+#include 
 
 using namespace qpid::client;
 
 using namespace std;
 
-int main(int argc, char ** argv) 
+int 
+main(int argc, char ** argv) 
 {
 ConnectionSettings settings;
-if ( argc != 4 )
+if ( argc != 6 )
 {
-  cerr << "Usage: declare_queues host port durability\n";
+  cerr << "Usage: declare_queues host port durability queue_name_prefix 
n_queues\n";
   return 1;
 }
 
 settings.host = argv[1];
 settings.port = atoi(argv[2]);
 int durability = atoi(argv[3]);
+char const * queue_name_prefix = argv[4];
+int n_queues = atoi(argv[5]);
 
 FailoverManager connection(settings);
-try {
-bool complete = false;
-while (!complete) {
-Session session = connection.connect().newSession();
-try {
-if ( durability )
-  session.queueDeclare(arg::queue="message_queue", 
arg::durable=true);
-else
-  session.queueDeclare(arg::queue="message_queue");
-complete = true;
-} catch (const qpid::TransportFailure&) {}
-}
-connection.close();
-return 0;
-} catch (const exception& error) {
-cerr << "declare_queues failed:" << error.what() << endl;
-cerr << "  host: " << settings.host 
- << "  port: " << settings.port << endl;
-return 1;
+
+int max_fail = 13;
+for ( int i = 0; i < n_queues; ++ i ) {
+stringstream queue_name;
+queue_name << queue_name_prefix << '_' << i;
+
+bool queue_created = false;
+int failure_count;
+
+// Any non-transport failure is Bad.
+try
+{
+while ( ! queue_created ) {
+Session session = connection.connect().newSession();
+// TransportFailures aren't too bad -- they might happen 
because
+// we are doing a cluster failover test.  But if we get too 
many,
+// we will still bug out.
+failure_count = 0;
+try {
+if ( durability )
+session.queueDeclare(arg::queue=queue_name.str(), 
arg::durable=true);
+else
+session.queueDeclare(arg::queue=queue_name.str());
+queue_created = true;
+cout << "declare_queues: Created queue " << 
queue_name.str() << endl;
+}
+catch ( const qpid::TransportFailure& ) {
+  if ( ++ failure_count >= max_fail ) {
+  cerr << "declare_queues failed: too many transport 
errors.\n";
+  cerr << "  host: " << settings.host
+   << "  port: " << settings.port << endl;
+  return 1;
+  }
+  sleep ( 1 );
+}
+}
+   }
+   catch ( const exception & error) {
+   cerr << "declare_queues failed:" << error.what() << endl;
+   cerr << "  host: " << settings.host
+<< "  port: " << settings.port << endl;
+   return 1;
+   }
 }
-
 }
 
 

Modified: qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp?rev=835746&r1=835745&r2=835746&view=diff
==
--- qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp Fri Nov 13 05:37:54 2009
@@ -433,7 +433,9 @@
 char const *  host,