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 2008/09/01 01:57:41 UTC
svn commit: r690824 -
/activemq/activemq-cpp/tags/activemq-cpp-2.2.1/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Author: tabish
Date: Sun Aug 31 16:57:41 2008
New Revision: 690824
URL: http://svn.apache.org/viewvc?rev=690824&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-165
Modified:
activemq/activemq-cpp/tags/activemq-cpp-2.2.1/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Modified: activemq/activemq-cpp/tags/activemq-cpp-2.2.1/src/main/activemq/connector/openwire/OpenWireConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/activemq-cpp-2.2.1/src/main/activemq/connector/openwire/OpenWireConnector.cpp?rev=690824&r1=690823&r2=690824&view=diff
==============================================================================
--- activemq/activemq-cpp/tags/activemq-cpp-2.2.1/src/main/activemq/connector/openwire/OpenWireConnector.cpp (original)
+++ activemq/activemq-cpp/tags/activemq-cpp-2.2.1/src/main/activemq/connector/openwire/OpenWireConnector.cpp Sun Aug 31 16:57:41 2008
@@ -273,29 +273,28 @@
sessionId->setConnectionId( connectionInfo.getConnectionId()->getValue() );
sessionId->setValue( sessionIds.getNextSequenceId() );
info->setSessionId( sessionId );
+
+ // Create and initialize the Connector's Session Info object, this will
+ // cleanup the SessionInfo command when destroyed.
OpenWireSessionInfo* session = new OpenWireSessionInfo( this );
+ session->setSessionInfo( info );
+ session->setAckMode( ackMode );
try{
// Send the subscription message to the broker.
- Response* response = syncRequest(info);
+ Response* response = syncRequest( info );
// The broker did not return an error - this is good.
// Just discard the response.
delete response;
- // Create the Connector Session Wrapper Object and fill in its
- // data
- session->setSessionInfo( info );
- session->setAckMode( ackMode );
-
// Return the session info.
return session;
} catch( ConnectorException& ex ) {
// Something bad happened - free the session info object.
- delete info;
delete session;
ex.setMark(__FILE__, __LINE__);
@@ -403,19 +402,16 @@
} catch( ConnectorException& ex ) {
delete consumer;
- delete consumerInfo;
ex.setMark( __FILE__, __LINE__ );
throw ex;
} catch( Exception& ex ) {
delete consumer;
- delete consumerInfo;
ex.setMark( __FILE__, __LINE__ );
throw OpenWireConnectorException( ex );
} catch( ... ) {
delete consumer;
- delete consumerInfo;
throw OpenWireConnectorException( __FILE__, __LINE__,
"caught unknown exception" );