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 2007/02/18 22:18:12 UTC
svn commit: r509006 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Author: tabish
Date: Sun Feb 18 13:18:11 2007
New Revision: 509006
URL: http://svn.apache.org/viewvc?view=rev&rev=509006
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=509006&r1=509005&r2=509006
==============================================================================
--- 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 Sun Feb 18 13:18:11 2007
@@ -302,13 +302,13 @@
} catch( ConnectorException& ex ){
try{ transport->close(); } catch( ... ){}
-
+
ex.setMark(__FILE__,__LINE__);
throw ex;
} catch( ... ) {
try{ transport->close(); } catch( ... ){}
- throw OpenWireConnectorException(__FILE__, __LINE__,
+ throw OpenWireConnectorException(__FILE__, __LINE__,
"Caught unknown exception" );
}
@@ -367,7 +367,7 @@
const cms::Destination* destination,
connector::SessionInfo* session,
const std::string& selector,
- bool noLocal AMQCPP_UNUSED )
+ bool noLocal )
throw ( ConnectorException )
{
OpenWireConsumerInfo* consumer = NULL;
@@ -391,11 +391,11 @@
// The broker did not return an error - this is good.
// Just discard the response.
delete response;
-
+
// Since we've successfully registered - add this consumer to the
// consumer info map.
synchronized( &consumerInfoMap ) {
- consumerInfoMap.setValue(
+ consumerInfoMap.setValue(
consumerInfo->getConsumerId()->getValue(),
consumer );
}
@@ -434,7 +434,7 @@
enforceConnected();
consumer = new OpenWireConsumerInfo();
- consumer->setSessionInfo( session );
+ consumer->setSessionInfo( session );
consumerInfo = createConsumerInfo( topic, session );
consumer->setConsumerInfo( consumerInfo );
@@ -565,7 +565,7 @@
producer = new OpenWireProducerInfo();
producer->setSessionInfo( session );
-
+
producerInfo = new commands::ProducerInfo();
producer->setProducerInfo( producerInfo );
@@ -715,7 +715,7 @@
"Producer was not of the OpenWire flavor.");
}
- const SessionInfo* session = producerInfo->getSessionInfo();
+ const SessionInfo* session = producerInfo->getSessionInfo();
commands::Message* amqMessage =
dynamic_cast< commands::Message* >( message );
@@ -768,17 +768,17 @@
// The broker did not return an error - this is good.
// Just discard the response.
delete response;
-
+
} catch( ConnectorException& ex ){
-
+
try{ transport->close(); } catch( ... ){}
-
+
ex.setMark(__FILE__,__LINE__);
throw ex;
} catch( ... ) {
-
+
try{ transport->close(); } catch( ... ){}
-
+
throw OpenWireConnectorException( __FILE__, __LINE__,
"Caught unknown exception" );
}
@@ -876,13 +876,13 @@
}
} catch( ConnectorException& ex ){
try{ transport->close(); } catch( ... ){}
-
+
ex.setMark(__FILE__,__LINE__);
throw ex;
} catch( ... ) {
-
+
try{ transport->close(); } catch( ... ){}
-
+
throw OpenWireConnectorException( __FILE__, __LINE__,
"Caught unknown exception" );
}
@@ -925,9 +925,9 @@
ex.setMark(__FILE__,__LINE__);
throw ex;
} catch( ... ) {
-
+
try{ transport->close(); } catch( ... ){}
-
+
throw OpenWireConnectorException( __FILE__, __LINE__,
"Caught unknown exception" );
}
@@ -963,9 +963,9 @@
ex.setMark(__FILE__,__LINE__);
throw ex;
} catch( ... ) {
-
+
try{ transport->close(); } catch( ... ){}
-
+
throw OpenWireConnectorException( __FILE__, __LINE__,
"Caught unknown exception" );
}
@@ -1001,9 +1001,9 @@
ex.setMark(__FILE__,__LINE__);
throw ex;
} catch( ... ) {
-
+
try{ transport->close(); } catch( ... ){}
-
+
throw OpenWireConnectorException( __FILE__, __LINE__,
"Caught unknown exception" );
}
@@ -1123,13 +1123,13 @@
dynamic_cast<commands::ActiveMQTempDestination*>(resource);
if( consumer != NULL ) {
-
+
// Remove this consumer from the consumer info map
synchronized( &consumerInfoMap ) {
- consumerInfoMap.remove(
+ consumerInfoMap.remove(
consumer->getConsumerInfo()->getConsumerId()->getValue() );
}
-
+
dataStructure = consumer->getConsumerInfo()->getConsumerId();
} else if( producer != NULL ) {
dataStructure = producer->getProducerInfo()->getProducerId();
@@ -1192,10 +1192,10 @@
}
if( message == NULL ) {
delete command;
- throw OpenWireConnectorException( __FILE__, __LINE__,
+ throw OpenWireConnectorException( __FILE__, __LINE__,
"Received unsupported dispatch message" );
}
-
+
// Get the consumer info object for this consumer.
OpenWireConsumerInfo* info = NULL;
synchronized( &consumerInfoMap ) {
@@ -1206,9 +1206,9 @@
"Received dispatch message for unregistered consumer" );
}
}
-
- try{
-
+
+ try{
+
// Callback the listener (the connection object).
if( messageListener != NULL ){
messageListener->onConsumerMessage(
@@ -1216,7 +1216,7 @@
message,
false );
}
-
+
}catch( ... ){/* do nothing*/}
delete command;
@@ -1289,7 +1289,7 @@
throw ( ConnectorException )
{
try
- {
+ {
Response* response = transport->request(command);
commands::ExceptionResponse* exceptionResponse = dynamic_cast<commands::ExceptionResponse*>(response);