Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 2557 invoked from network); 7 Jan 2009 16:44:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jan 2009 16:44:56 -0000 Received: (qmail 43028 invoked by uid 500); 7 Jan 2009 16:44:56 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 43006 invoked by uid 500); 7 Jan 2009 16:44:56 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 42997 invoked by uid 99); 7 Jan 2009 16:44:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 08:44:55 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 16:44:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C4ADA238896F; Wed, 7 Jan 2009 08:44:34 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090107164434.C4ADA238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 #include #include +#include #include #include #include @@ -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 #include #include #include @@ -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 #include #include +#include #include #include #include @@ -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 #include +#include + 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; }