activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r507931 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Date Thu, 15 Feb 2007 13:53:51 GMT
Author: tabish
Date: Thu Feb 15 05:53:50 2007
New Revision: 507931

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

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=507931&r1=507930&r2=507931
==============================================================================
--- 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 05:53:50 2007
@@ -44,7 +44,6 @@
 using namespace activemq::transport;
 using namespace activemq::exceptions;
 using namespace activemq::connector::openwire;
-using namespace activemq::connector::openwire::commands;
 
 ////////////////////////////////////////////////////////////////////////////////
 OpenWireConnector::OpenWireConnector( Transport* transport,
@@ -214,7 +213,7 @@
         }
 
         // Generate a connectionId
-        ConnectionId* connectionId = new ConnectionId();
+        commands::ConnectionId* connectionId = new commands::ConnectionId();
         connectionId->setValue( Guid::createGUIDString() );
         connectionInfo.setConnectionId( connectionId );
 
@@ -244,7 +243,7 @@
         disposeOf( connectionInfo.getConnectionId() );
 
         // Send the disconnect command to the broker.
-        ShutdownInfo shutdown;
+        commands::ShutdownInfo shutdown;
         oneway( &shutdown );
 
     } catch( ConnectorException& ex ){
@@ -266,31 +265,31 @@
 
         // Create and initialize a new SessionInfo object
         commands::SessionInfo* info = new commands::SessionInfo();
-        SessionId* sessionId = new SessionId();
+        commands::SessionId* sessionId = new commands::SessionId();
         sessionId->setConnectionId( connectionInfo.getConnectionId()->getValue() );
         sessionId->setValue( getNextSessionId() );
         info->setSessionId( sessionId );
-            
+
         try{
-            
+
             // Send the subscription message to the broker.
             Response* response = syncRequest(info);
-            
+
             // The broker did not return an error - this is good.
             // Just discard the response.
             delete response;
-            
+
             // Return the session info.
             return NULL; /* TODO: Find a way to bridge between commands::SessionInfo and
connector::SessionInfo */
-            
+
         } catch( ConnectorException& ex ) {
-            
+
             // Something bad happened - free the session info object.
             delete info;
-            
+
             ex.setMark(__FILE__, __LINE__);
             throw ex;
-        }        
+        }
     }
     AMQ_CATCH_RETHROW( ConnectorException )
     AMQ_CATCHALL_THROW( ConnectorException )
@@ -726,14 +725,14 @@
 {
     try
     {
-        MessageDispatch* dispatch =
-            dynamic_cast<MessageDispatch*>( command );
-        WireFormatInfo* brokerWireFormatInfo =
-            dynamic_cast<WireFormatInfo*>( command );
-        BrokerInfo* brokerInfo =
-            dynamic_cast<BrokerInfo*>( command );
-        ShutdownInfo* shutdownInfo =
-            dynamic_cast<ShutdownInfo*>( command );
+        commands::MessageDispatch* dispatch =
+            dynamic_cast<commands::MessageDispatch*>( command );
+        commands::WireFormatInfo* brokerWireFormatInfo =
+            dynamic_cast<commands::WireFormatInfo*>( command );
+        commands::BrokerInfo* brokerInfo =
+            dynamic_cast<commands::BrokerInfo*>( command );
+        commands::ShutdownInfo* shutdownInfo =
+            dynamic_cast<commands::ShutdownInfo*>( command );
 
         if( dispatch != NULL ) {
 
@@ -822,20 +821,20 @@
         Response* response = transport->request(command);
         ExceptionResponse* exceptionResponse = dynamic_cast<ExceptionResponse*>(response);
         if( exceptionResponse != NULL )
-        {   
+        {
             // Create an exception to hold the error information.
             /*commands::BrokerError* brokerError = dynamic_cast<commands::BrokerError*>(exceptionResponse->getException());
             BrokerException exception( __FILE__, __LINE__, brokerError );*/
             /* TODO: Bridge between transport::BrokerError and openwire::commands::BrokerError
*/
             OpenWireConnectorException exception( __FILE__, __LINE__, "An error occurred
at the broker" );
-            
+
             // Free the response command.
             delete response;
-            
+
             // Throw the exception.
             throw exception;
         }
-        
+
         // Nothing bad happened - just return the response.
         return response;
     }
@@ -846,13 +845,14 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenWireConnector::disposeOf(DataStructure* objectId) throw (ConnectorException)
+void OpenWireConnector::disposeOf(
+    commands::DataStructure* objectId ) throw ( ConnectorException )
 {
     try
     {
-        RemoveInfo command;
+        commands::RemoveInfo command;
         command.setObjectId( objectId->cloneDataStructure() );
-        oneway(&command);
+        oneway( &command );
     }
     AMQ_CATCH_RETHROW( ConnectorException )
     AMQ_CATCHALL_THROW( OpenWireConnectorException )



Mime
View raw message