activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r732392 - in /activemq/activemq-cpp/trunk/src/examples: consumers/SimpleAsyncConsumer.cpp main.cpp producers/SimpleProducer.cpp topics/chat/Chat.cpp
Date Wed, 07 Jan 2009 16:44:34 GMT
Author: tabish
Date: Wed Jan  7 08:44:33 2009
New Revision: 732392

URL: http://svn.apache.org/viewvc?rev=732392&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-100

Some initial refactoring work that leads to V3 and addition of Failover.

Modified:
    activemq/activemq-cpp/trunk/src/examples/consumers/SimpleAsyncConsumer.cpp
    activemq/activemq-cpp/trunk/src/examples/main.cpp
    activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp
    activemq/activemq-cpp/trunk/src/examples/topics/chat/Chat.cpp

Modified: activemq/activemq-cpp/trunk/src/examples/consumers/SimpleAsyncConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/examples/consumers/SimpleAsyncConsumer.cpp?rev=732392&r1=732391&r2=732392&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/examples/consumers/SimpleAsyncConsumer.cpp (original)
+++ activemq/activemq-cpp/trunk/src/examples/consumers/SimpleAsyncConsumer.cpp Wed Jan  7
08:44:33 2009
@@ -19,6 +19,7 @@
 #include <decaf/lang/Runnable.h>
 #include <decaf/util/concurrent/CountDownLatch.h>
 #include <activemq/core/ActiveMQConnectionFactory.h>
+#include <activemq/library/ActiveMQCPP.h>
 #include <decaf/lang/Integer.h>
 #include <activemq/util/Config.h>
 #include <decaf/util/Date.h>
@@ -189,6 +190,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 int main(int argc AMQCPP_UNUSED, char* argv[] AMQCPP_UNUSED) {
 
+    activemq::library::ActiveMQCPP::initializeLibrary();
+
     std::cout << "=====================================================\n";
     std::cout << "Starting the example:" << std::endl;
     std::cout << "-----------------------------------------------------\n";
@@ -251,4 +254,6 @@
     std::cout << "-----------------------------------------------------\n";
     std::cout << "Finished with the example." << std::endl;
     std::cout << "=====================================================\n";
+
+    activemq::library::ActiveMQCPP::shutdownLibrary();
 }

Modified: activemq/activemq-cpp/trunk/src/examples/main.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/examples/main.cpp?rev=732392&r1=732391&r2=732392&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/examples/main.cpp (original)
+++ activemq/activemq-cpp/trunk/src/examples/main.cpp Wed Jan  7 08:44:33 2009
@@ -17,6 +17,7 @@
 
 // START SNIPPET: demo
 
+#include <activemq/library/ActiveMQCPP.h>
 #include <decaf/lang/Thread.h>
 #include <decaf/lang/Runnable.h>
 #include <decaf/util/concurrent/CountDownLatch.h>
@@ -332,6 +333,8 @@
 
 int main(int argc AMQCPP_UNUSED, char* argv[] AMQCPP_UNUSED) {
 
+    activemq::library::ActiveMQCPP::initializeLibrary();
+
     std::cout << "=====================================================\n";
     std::cout << "Starting the example:" << std::endl;
     std::cout << "-----------------------------------------------------\n";
@@ -398,6 +401,8 @@
     std::cout << "-----------------------------------------------------\n";
     std::cout << "Finished with the example." << std::endl;
     std::cout << "=====================================================\n";
+
+    activemq::library::ActiveMQCPP::shutdownLibrary();
 }
 
 // END SNIPPET: demo

Modified: activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp?rev=732392&r1=732391&r2=732392&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp (original)
+++ activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp Wed Jan  7 08:44:33
2009
@@ -22,6 +22,7 @@
 #include <decaf/util/Date.h>
 #include <activemq/core/ActiveMQConnectionFactory.h>
 #include <activemq/util/Config.h>
+#include <activemq/library/ActiveMQCPP.h>
 #include <cms/Connection.h>
 #include <cms/Session.h>
 #include <cms/TextMessage.h>
@@ -187,6 +188,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 int main(int argc AMQCPP_UNUSED, char* argv[] AMQCPP_UNUSED) {
 
+    activemq::library::ActiveMQCPP::initializeLibrary();
+
     std::cout << "=====================================================\n";
     std::cout << "Starting the example:" << std::endl;
     std::cout << "-----------------------------------------------------\n";
@@ -254,4 +257,6 @@
     std::cout << "-----------------------------------------------------\n";
     std::cout << "Finished with the example." << std::endl;
     std::cout << "=====================================================\n";
+
+    activemq::library::ActiveMQCPP::shutdownLibrary();
 }

Modified: activemq/activemq-cpp/trunk/src/examples/topics/chat/Chat.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/examples/topics/chat/Chat.cpp?rev=732392&r1=732391&r2=732392&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/examples/topics/chat/Chat.cpp (original)
+++ activemq/activemq-cpp/trunk/src/examples/topics/chat/Chat.cpp Wed Jan  7 08:44:33 2009
@@ -27,6 +27,8 @@
 #include <cms/CMSException.h>
 #include <cms/ConnectionFactory.h>
 
+#include <activemq/library/ActiveMQCPP.h>
+
 using namespace std;
 using namespace cms;
 using namespace example;
@@ -200,6 +202,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 int main( int argc, char *argv[] ) {
 
+    activemq::library::ActiveMQCPP::initializeLibrary();
+
     Chat chat;
 
     // Is there anything to do?
@@ -265,5 +269,7 @@
     // Start the CMS client for the "chat".
     chat.run();
 
+    activemq::library::ActiveMQCPP::shutdownLibrary();
+
     return 0;
 }



Mime
View raw message