activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: QueueBrowser in XA Transaction?
Date Fri, 23 Apr 2010 14:11:16 GMT
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 <Daniel.Nawrocki@ngc.com> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message