activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r507937 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire: OpenWireConnector.cpp OpenWireSessionInfo.h
Date Thu, 15 Feb 2007 14:23:39 GMT
Author: tabish
Date: Thu Feb 15 06:23:38 2007
New Revision: 507937

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

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/OpenWireSessionInfo.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=507937&r1=507936&r2=507937
==============================================================================
--- 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 06:23:38 2007
@@ -25,6 +25,10 @@
 #include <activemq/util/Integer.h>
 #include <activemq/util/Guid.h>
 #include <activemq/connector/openwire/OpenWireConnectorException.h>
+#include <activemq/connector/openwire/OpenWireSessionInfo.h>
+#include <activemq/connector/openwire/OpenWireProducerInfo.h>
+#include <activemq/connector/openwire/OpenWireConsumerInfo.h>
+#include <activemq/connector/openwire/OpenWireTransactionInfo.h>
 #include <activemq/connector/openwire/BrokerException.h>
 #include <activemq/connector/openwire/OpenWireFormatFactory.h>
 
@@ -269,6 +273,7 @@
         sessionId->setConnectionId( connectionInfo.getConnectionId()->getValue() );
         sessionId->setValue( getNextSessionId() );
         info->setSessionId( sessionId );
+        OpenWireSessionInfo* session = new OpenWireSessionInfo();
 
         try{
 
@@ -279,13 +284,19 @@
             // 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 NULL; /* TODO: Find a way to bridge between commands::SessionInfo and
connector::SessionInfo */
+            return session;
 
         } catch( ConnectorException& ex ) {
 
             // Something bad happened - free the session info object.
             delete info;
+            delete session;
 
             ex.setMark(__FILE__, __LINE__);
             throw ex;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h?view=diff&rev=507937&r1=507936&r2=507937
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
Thu Feb 15 06:23:38 2007
@@ -143,7 +143,7 @@
          * Session
          * @param sessionInfo - the SessionInfo for this Session.
          */
-        virtual void setSessionInfo( SessionInfo* sessionInfo ) {
+        virtual void setSessionInfo( commands::SessionInfo* sessionInfo ) {
             this->sessionInfo = sessionInfo;
         }
 



Mime
View raw message