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 2013/07/18 17:44:14 UTC
svn commit: r1504502 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
Author: tabish
Date: Thu Jul 18 15:44:14 2013
New Revision: 1504502
URL: http://svn.apache.org/r1504502
Log:
https://issues.apache.org/jira/browse/AMQCPP-501
If no messages delivered to client we don't need to remain in the TX, just close as normal so that prefetched messages get redispatched.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp?rev=1504502&r1=1504501&r2=1504502&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp Thu Jul 18 15:44:14 2013
@@ -792,7 +792,8 @@ void ActiveMQConsumerKernel::close() {
try {
if (!this->isClosed()) {
- if (this->session->getTransactionContext() != NULL &&
+ if (!this->internal->dispatchedMessages.isEmpty() &&
+ this->session->getTransactionContext() != NULL &&
this->session->getTransactionContext()->isInTransaction() &&
this->internal->closeSyncRegistered.compareAndSet(false, true)) {