I'm using jbossesb-server-4.2.1GA, and I observe the following:
If one of my actions throw a runtime-exception (which they haven't done in quite a long time, so I was surprised to see this..), the Service is run several times over again (and of course, these reruns fail at the exact same place..) until I get this in the log:
19:55:29,853 WARN [AbstractDLQHandler] Message redelivered=6 max=5 sending it to the dlq delegator->JBossMessage[57540]:NON-PERSISTENT, deliveryId=1
It appears to me that this happens because in ActionProcessingPipeline, first this is evaluated to true:
final boolean throwRuntime = transactional && (ex instanceof RuntimeException) ;
and then the exception is thrown from the process(Message) method by this code:
if (throwRuntime)
{
throw (RuntimeException)ex ;
}
I'm not sure what causes the retry here.. I thought it was the following code in JmsCourier, but that doesn't seem to be the case..
catch (JMSException e) {
jmsConnectRetry(e);
}
There is a lot of code I don't have access to, I guess it is code from the JBossMessaging-project. I can download that too I guess, but maybe you guys can answer this easily..
Why are RuntimeExceptions treated so different from ActionProcessingExceptions? Can I turn of this behaviour in any way? (Perhaps I can change the boolean variable transactional, will that make a difference?) Why is the transactional-variable true in the first place, I don't use transactions as far as I know.. :-) I'm using the jms-jca-provider in jboss-esb.xml, does that matter?
Hm.. lots of questions. Does anyone have the answers? :)
Regards, Haagen