QueueBrowser in transacted session fails
----------------------------------------
Key: AMQ-2712
URL: https://issues.apache.org/activemq/browse/AMQ-2712
Project: ActiveMQ
Issue Type: Bug
Components: JMS client
Affects Versions: 5.3.1
Reporter: Dan Nawrocki
A QueueBrowser cannot be used on a transacted session. During the call to
destroyConsumer(), the call:
if (session.getTransacted()) {
session.commit();
}
will fail and the consumer will not be closed.
Additionally, when calling nextElement(), the ackLater() method (called by
beforeMessageIsConsumed(), called by receiveNoWait(), called by nextElement())
will throw a JMSException.
The latter issue may be related to
https://issues.apache.org/activemq/browse/AMQ-2659, but the former is not.
The workaround is to always use non-transacted QueueBrowsers and manually
handle any issues if you try to consume a message found in the QueueBrowser.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.