activemq-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?view=rev&rev=508275
Log:
[AMQCPP-30] adding exception declaration on connect/disconnect

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

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=508275&r1=508274&r2=508275
==============================================================================
--- 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:37:01 2007
@@ -209,9 +209,10 @@
 
     try
     {
+
         synchronized( &mutex )
         {
-            if( state == this->CONNECTED )
+            if( state == CONNECTED )
             {
                 // Send the disconnect message to the broker.
                 disconnect();
@@ -226,12 +227,12 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenWireConnector::connect()
+void OpenWireConnector::connect() throw (ConnectorException)
 {
     try
     {
         // Mark this connector as started.
-        state = this->CONNECTING;
+        state = CONNECTING;
 
         // Fill in our connection info.
         connectionInfo.setUserName( getUsername() );
@@ -260,12 +261,11 @@
         delete response;
     }
     AMQ_CATCH_RETHROW( ConnectorException )
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCHALL_THROW( OpenWireConnectorException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenWireConnector::disconnect()
+void OpenWireConnector::disconnect() throw (ConnectorException)
 {
     try
     {
@@ -275,16 +275,17 @@
         // 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();
         throw ex;
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCHALL_THROW( OpenWireConnectorException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.h?view=diff&rev=508275&r1=508274&r2=508275
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.h
Thu Feb 15 17:37:01 2007
@@ -167,12 +167,12 @@
          * Sends the connect message to the broker and
          * waits for the response.
          */
-        void connect(void);
+        void connect() throw (ConnectorException);
 
         /**
          * Sends a oneway disconnect message to the broker.
          */
-        void disconnect(void);
+        void disconnect() throw (ConnectorException);
 
         /**
          * Fires a consumer message to the observer.



Mime
View raw message