activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r533700 - /activemq/activemq-cpp/tags/activemq-cpp-2.0.1/src/examples/main.cpp
Date Mon, 30 Apr 2007 11:36:02 GMT
Author: tabish
Date: Mon Apr 30 04:36:01 2007
New Revision: 533700

URL: http://svn.apache.org/viewvc?view=rev&rev=533700
Log:
Merging in fixes for 2.0.1

Modified:
    activemq/activemq-cpp/tags/activemq-cpp-2.0.1/src/examples/main.cpp

Modified: activemq/activemq-cpp/tags/activemq-cpp-2.0.1/src/examples/main.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/activemq-cpp-2.0.1/src/examples/main.cpp?view=diff&rev=533700&r1=533699&r2=533700
==============================================================================
--- activemq/activemq-cpp/tags/activemq-cpp-2.0.1/src/examples/main.cpp (original)
+++ activemq/activemq-cpp/tags/activemq-cpp-2.0.1/src/examples/main.cpp Mon Apr 30 04:36:01
2007
@@ -230,7 +230,13 @@
             count++;
             const TextMessage* textMessage =
                 dynamic_cast< const TextMessage* >( message );
-            string text = textMessage->getText();
+            string text = "";
+
+            if( textMessage != NULL ) {
+                text = textMessage->getText();
+            } else {
+                text = "NOT A TEXTMESSAGE!";
+            }
 
             printf( "Message #%d Received: %s\n", count, text.c_str() );
         } catch (CMSException& e) {
@@ -294,9 +300,10 @@
     // tightMarshalling or tcp logging etc.
     std::string brokerURI =
         "tcp://127.0.0.1:61616"
-        "?wireFormat=openwire";
-//        "&commandTracingEnabled=true"
-//        "&tcpTracingEnabled=true"
+        "?wireFormat=openwire"
+        "&transport.useAsyncSend=true";
+//        "&transport.commandTracingEnabled=true"
+//        "&transport.tcpTracingEnabled=true";
 //        "&wireFormat.tightEncodingEnabled=true";
 
     //============================================================



Mime
View raw message