this seems to be another case of https://issues.apache.org/activemq/browse/AMQ-2659 and you also have a valid use case.
On 23 April 2010 14:35, dnn <[email protected]> wrote: > > Is the QueueBrowser designed to be run inside an XA transaction? I keep > getting the following exception when calling the hasMoreElements() method: > > javax.jms.TransactionInProgressException: Cannot commit() inside an > XASession > at > org.apache.activemq.ActiveMQXASession.commit(ActiveMQXASession.java:80) > at > > org.apache.activemq.ActiveMQQueueBrowser.destroyConsumer(ActiveMQQueueBrowser.java:117) > at > > org.apache.activemq.ActiveMQQueueBrowser.hasMoreElements(ActiveMQQueueBrowser.java:165) > <rest truncated> > > That is related to the following code in the > ActiveMQQueueBrowser#destroyConsumer() method: > > if (session.getTransacted()) { > session.commit(); > } > > I'm fairly new to using XA, but it seems to me that the QueueBrowser > shouldn't be calling commit() on its own and instead letting the > TransactionManager commit. Should I always be using the QueueBrowser in a > local transaction, or am I missing something? > > Thanks, > Dan Nawrocki > -- > View this message in context: > http://old.nabble.com/QueueBrowser-in-XA-Transaction--tp28341411p28341411.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source Integration http://fusesource.com
