activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dnn <Daniel.Nawro...@ngc.com>
Subject QueueBrowser in XA Transaction?
Date Fri, 23 Apr 2010 13:35:09 GMT

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.


Mime
View raw message