activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1000145 - in /activemq/activemq-cpp/branches/activemq-cpp-3.2.x: ./ activemq-cpp/src/examples/ activemq-cpp/src/examples/cmstemplate/ activemq-cpp/src/main/activemq/cmsutil/ activemq-cpp/src/main/activemq/core/ activemq-cpp/src/main/active...
Date Wed, 22 Sep 2010 19:07:45 GMT
Author: tabish
Date: Wed Sep 22 19:07:45 2010
New Revision: 1000145

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

Merge fixes from trunk

Added:
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/cmstemplate/
      - copied from r999451, activemq/activemq-cpp/trunk/activemq-cpp/src/examples/cmstemplate/
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/cmstemplate/CMSTemplateReceiver.cpp
      - copied unchanged from r999451, activemq/activemq-cpp/trunk/activemq-cpp/src/examples/cmstemplate/CMSTemplateReceiver.cpp
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp
      - copied, changed from r999451, activemq/activemq-cpp/trunk/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp
Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/   (props changed)
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/Makefile.am
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp
  (contents, props changed)

Propchange: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 22 19:07:45 2010
@@ -1 +1 @@
-/activemq/activemq-cpp/trunk:953720-953865,956553,988664-988753
+/activemq/activemq-cpp/trunk:953720-953865,956553,988664-988753,999059-999451

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/Makefile.am?rev=1000145&r1=1000144&r2=1000145&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/Makefile.am
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/Makefile.am
Wed Sep 22 19:07:45 2010
@@ -48,6 +48,20 @@ chat_SOURCES = $(chat_sources)
 chat_LDADD= $(AMQ_TEST_LIBS)
 chat_CXXFLAGS = $(AMQ_TEST_CXXFLAGS) -I$(srcdir)/../main
 
+## CMSTemplate Message send Sample
+cmstemplate_sender_sources = ./cmstemplate/CMSTemplateSender.cpp
+noinst_PROGRAMS += cmstemplate_sender
+cmstemplate_sender_SOURCES = $(cmstemplate_sender_sources)
+cmstemplate_sender_LDADD= $(AMQ_TEST_LIBS)
+cmstemplate_sender_CXXFLAGS = $(AMQ_TEST_CXXFLAGS) -I$(srcdir)/../main
+
+## CMSTemplate Message receive Sample
+cmstemplate_receiver_sources = ./cmstemplate/CMSTemplateReceiver.cpp
+noinst_PROGRAMS += cmstemplate_receiver
+cmstemplate_receiver_SOURCES = $(cmstemplate_receiver_sources)
+cmstemplate_receiver_LDADD= $(AMQ_TEST_LIBS)
+cmstemplate_receiver_CXXFLAGS = $(AMQ_TEST_CXXFLAGS) -I$(srcdir)/../main
+
 ## Advisory Producer Example
 advisory_producer_sources = advisories/AdvisoryProducer.cpp \
                             advisories/AdvisoryProducerMain.cpp

Copied: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp
(from r999451, activemq/activemq-cpp/trunk/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp?p2=activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp&p1=activemq/activemq-cpp/trunk/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp&r1=999451&r2=1000145&rev=1000145&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/examples/cmstemplate/CMSTemplateSender.cpp
Wed Sep 22 19:07:45 2010
@@ -57,7 +57,7 @@ namespace{
 
         virtual ~TextMessageCreator() throw() {}
 
-        virtual cms::Message* createMessage( cms::Session* session ) {
+        virtual cms::Message* createMessage( cms::Session* session ) throw ( cms::CMSException
) {
 
             cms::Message* message = NULL;
 

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp?rev=1000145&r1=1000144&r2=1000145&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp
Wed Sep 22 19:07:45 2010
@@ -672,6 +672,14 @@ void CmsTemplate::ReceiveExecutor::doInC
         parent->destroyMessage( message );
 
         throw e;
+    } catch( cms::CMSException& e ) {
+
+        e.setMark( __FILE__, __LINE__ );
+
+        // Destroy the message resource.
+        parent->destroyMessage( message );
+
+        throw e;
     }
 }
 

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp?rev=1000145&r1=1000144&r2=1000145&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
Wed Sep 22 19:07:45 2010
@@ -177,7 +177,12 @@ ActiveMQConnection::ActiveMQConnection( 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQConnection::~ActiveMQConnection() {
     try {
-        this->close();
+
+        try{
+            this->close();
+        } catch(...) {}
+
+        // This must happen even if exceptions occur in the Close attempt.
         delete this->config;
     }
     AMQ_CATCH_NOTHROW( ActiveMQException )
@@ -439,6 +444,9 @@ void ActiveMQConnection::disconnect( lon
 
     try{
 
+        // Clear the listener, we don't care about async errors at this point.
+        this->config->transport->setTransportListener( NULL );
+
         // Remove our ConnectionId from the Broker
         Pointer<RemoveInfo> command( this->config->connectionInfo->createRemoveCommand()
);
         command->setLastDeliveredSequenceId( lastDeliveredSequenceId );
@@ -454,9 +462,6 @@ void ActiveMQConnection::disconnect( lon
 
         if( this->config->transport != NULL ){
 
-            // Clear the listener, we don't care about errors at this point.
-            this->config->transport->setTransportListener( NULL );
-
             try{
                 this->config->transport->close();
             }catch( exceptions::ActiveMQException& ex ){

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp?rev=1000145&r1=1000144&r2=1000145&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp
Wed Sep 22 19:07:45 2010
@@ -100,7 +100,9 @@ Pointer<Transport> TcpTransportFactory::
         }
 
         // If command tracing was enabled, wrap the transport with a logging transport.
-        if( properties.getProperty( "transport.commandTracingEnabled", "false" ) == "true"
) {
+        if( properties.getProperty( "transport.commandTracingEnabled", "false" ) == "true"
||
+            properties.getProperty( "transport.trace", "false" ) == "true" ) {
+
             // Create the Transport for response correlator
             transport.reset( new LoggingTransport( transport ) );
         }

Propchange: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 22 19:07:45 2010
@@ -0,0 +1 @@
+/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp:999059-999451



Mime
View raw message