activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher G. Stach II" <...@ldsys.net>
Subject Re: ActiveMQ 4 + Jencks + XA Transactions
Date Sat, 08 Jul 2006 17:41:28 GMT
Johan Brelet wrote:
> Perhaps I said a bit too fast that it was working fine... :)
> 
> Here is the problem I have now :
> In my tests I try to force the broker to rollback a global XA transaction
> when receiving a JMS Message. To do that, the onMessage() method throws a
> RuntimeException. So, I expect the broker to catch this exception, and then
> to rollback transaction, and later to try again delivering the message.
> But with ActiveMQ4.1 and latest Jencks from SVN HEAD, I don't understand the
> behaviour of the broker... The exception doesn't cause the transaction to
> rollback, so it stays active, and the broker do not redeliver the message.
> Here is a part of logs :
[...]
> I don't really understand what's going on...Am I doing something wrong ? Or
> is it a problem with ActiveMQ 4.1 ?

According to the spec, onMessage should not throw RuntimeException.  Get
a handle on the current Transaction and setRollbackOnly().

-- 
Christopher G. Stach II

Mime
View raw message