activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r508276 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Date Fri, 16 Feb 2007 01:47:11 GMT
Author: nmittler
Date: Thu Feb 15 17:47:11 2007
New Revision: 508276

URL: http://svn.apache.org/viewvc?view=rev&rev=508276
Log:
[AMQCPP-30] Remove ensureConnected() check on oneway to allow connection closing handshakes

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp?view=diff&rev=508276&r1=508275&r2=508276
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Thu Feb 15 17:47:11 2007
@@ -209,7 +209,6 @@
 
     try
     {
-
         synchronized( &mutex )
         {
             if( state == CONNECTED )
@@ -275,17 +274,23 @@
         // Remove our ConnectionId from the Broker
         disposeOf( connectionInfo.getConnectionId() );
 
-
         // Send the disconnect command to the broker.
         commands::ShutdownInfo shutdown;
         oneway( &shutdown );
 
-
     } catch( ConnectorException& ex ){
-        transport->close();
+        try{
+            transport->close();
+        } catch( cms::CMSException& e ){}
         throw ex;
+    } catch( ... ) {
+        try{
+            transport->close();
+        } catch( cms::CMSException& e ){}
+        
+        throw OpenWireConnectorException(__FILE__, __LINE__, "Caught unknown exception" );
     }
-    AMQ_CATCHALL_THROW( OpenWireConnectorException )
+    
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -927,12 +932,10 @@
 {
     try
     {
-        enforceConnected();
         transport->oneway(command);
     }
     AMQ_CATCH_EXCEPTION_CONVERT( CommandIOException, OpenWireConnectorException )
     AMQ_CATCH_EXCEPTION_CONVERT( UnsupportedOperationException, OpenWireConnectorException
)
-    AMQ_CATCH_RETHROW( ConnectorException )
     AMQ_CATCHALL_THROW( OpenWireConnectorException )
 }
 



Mime
View raw message