[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-commits
Subject:    svn commit: r690824 -
From:       tabish () apache ! org
Date:       2008-08-31 23:57:41
Message-ID: 20080831235741.B568B238896B () eris ! apache ! org
[Download RAW message or body]

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/ma \
in/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" );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic