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
