You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2008/08/23 19:29:26 UTC
svn commit: r688379 -
/activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp
Author: tabish
Date: Sat Aug 23 10:29:26 2008
New Revision: 688379
URL: http://svn.apache.org/viewvc?rev=688379&view=rev
Log:
Minor Code Cleanup
Modified:
activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp
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=688379&r1=688378&r2=688379&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp (original)
+++ activemq/activemq-cpp/trunk/src/examples/producers/SimpleProducer.cpp Sat Aug 23 10:29:26 2008
@@ -135,32 +135,32 @@
void cleanup(){
- // Destroy resources.
- try{
- if( destination != NULL ) delete destination;
- }catch ( CMSException& e ) { e.printStackTrace(); }
- destination = NULL;
-
- try{
- if( producer != NULL ) delete producer;
- }catch ( CMSException& e ) { e.printStackTrace(); }
- producer = NULL;
-
- // Close open resources.
- try{
- if( session != NULL ) session->close();
- if( connection != NULL ) connection->close();
- }catch ( CMSException& e ) { e.printStackTrace(); }
-
- try{
- if( session != NULL ) delete session;
- }catch ( CMSException& e ) { e.printStackTrace(); }
- session = NULL;
-
- try{
- if( connection != NULL ) delete connection;
- }catch ( CMSException& e ) { e.printStackTrace(); }
- connection = NULL;
+ // Destroy resources.
+ try{
+ if( destination != NULL ) delete destination;
+ }catch ( CMSException& e ) { e.printStackTrace(); }
+ destination = NULL;
+
+ try{
+ if( producer != NULL ) delete producer;
+ }catch ( CMSException& e ) { e.printStackTrace(); }
+ producer = NULL;
+
+ // Close open resources.
+ try{
+ if( session != NULL ) session->close();
+ if( connection != NULL ) connection->close();
+ }catch ( CMSException& e ) { e.printStackTrace(); }
+
+ try{
+ if( session != NULL ) delete session;
+ }catch ( CMSException& e ) { e.printStackTrace(); }
+ session = NULL;
+
+ try{
+ if( connection != NULL ) delete connection;
+ }catch ( CMSException& e ) { e.printStackTrace(); }
+ connection = NULL;
}
};
@@ -178,7 +178,7 @@
//
// http://activemq.apache.org/cms/
//
- // Wire Foormat Options:
+ // Wire Format Options:
// =====================
// Use either stomp or openwire, the default ports are different for each
//
@@ -189,8 +189,7 @@
//
std::string brokerURI =
"tcp://127.0.0.1:61616"
- "?wireFormat=openwire"
- "&soKeepAlive=true";
+ "?wireFormat=openwire";
// "&transport.useAsyncSend=true"
// "&transport.commandTracingEnabled=true"
// "&transport.tcpTracingEnabled=true";