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 2009/05/15 17:29:54 UTC

svn commit: r775191 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands: SessionInfo.cpp SessionInfo.h

Author: tabish
Date: Fri May 15 15:29:54 2009
New Revision: 775191

URL: http://svn.apache.org/viewvc?rev=775191&view=rev
Log:
Regenerated Session Info command that stores a transient ackMode value indicating the Acknowledge mode of the Session for use elsewhere in the client code.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp?rev=775191&r1=775190&r2=775191&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp Fri May 15 15:29:54 2009
@@ -18,6 +18,7 @@
 #include <activemq/commands/SessionInfo.h>
 #include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/state/CommandVisitor.h>
+#include <cms/Session.h>
 #include <decaf/lang/exceptions/NullPointerException.h>
 
 using namespace std;
@@ -40,6 +41,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 SessionInfo::SessionInfo() {
 
+    this->ackMode = (unsigned int)cms::Session::AUTO_ACKNOWLEDGE;
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h?rev=775191&r1=775190&r2=775191&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h Fri May 15 15:29:54 2009
@@ -45,6 +45,11 @@
      *
      */
     class AMQCPP_API SessionInfo : public BaseCommand {
+    private:
+
+        // The ACK mode that the Session was created with
+        unsigned int ackMode;
+
     protected:
 
         Pointer<SessionId> sessionId;
@@ -100,6 +105,14 @@
          */
         virtual bool equals( const DataStructure* value ) const;
 
+        unsigned int getAckMode() const {
+            return this->ackMode;
+        }
+
+        void setAckMode( unsigned int mode ) {
+            this->ackMode = mode;
+        }
+
         virtual const Pointer<SessionId>& getSessionId() const;
         virtual Pointer<SessionId>& getSessionId();
         virtual void setSessionId( const Pointer<SessionId>& sessionId );