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 2015/08/04 00:27:45 UTC

[2/2] activemq-cpp git commit: Update the values of last delivered sequence defaults to match JMS client.

Update the values of last delivered sequence defaults to match JMS
client.

Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/54c3b9d2
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/54c3b9d2
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/54c3b9d2

Branch: refs/heads/master
Commit: 54c3b9d2987641fbf8d61e33a7a30b80e8ed423c
Parents: 44bb925
Author: Timothy Bish <ta...@gmail.com>
Authored: Mon Aug 3 18:25:00 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Mon Aug 3 18:25:00 2015 -0400

----------------------------------------------------------------------
 activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp       | 2 +-
 .../src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp     | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/54c3b9d2/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp b/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
index cba5882..5858385 100644
--- a/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
+++ b/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
@@ -717,7 +717,7 @@ void ActiveMQConnection::close() {
             }
         }
 
-        long long lastDeliveredSequenceId = 0;
+        long long lastDeliveredSequenceId = -1;
 
         // Get the complete list of active sessions.
         try {

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/54c3b9d2/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp b/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
index 0329d61..f486964 100644
--- a/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
+++ b/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
@@ -203,7 +203,7 @@ ActiveMQSessionKernel::ActiveMQSessionKernel(ActiveMQConnection* connection,
                                                                              producerIds(),
                                                                              producerSequenceIds(),
                                                                              consumerIds(),
-                                                                             lastDeliveredSequenceId(0) {
+                                                                             lastDeliveredSequenceId(-2) {
 
     if (id == NULL || connection == NULL) {
         throw ActiveMQException(
@@ -225,8 +225,6 @@ ActiveMQSessionKernel::ActiveMQSessionKernel(ActiveMQConnection* connection,
         throw;
     }
 
-    this->closed.set(false);
-    this->lastDeliveredSequenceId = -1;
     this->config->sessionAsyncDispatch = connection->isAlwaysSessionAsync();
 
     // Create a Transaction object