Using JBoss-4.0.5.GA.
If I throw a RuntimeException from inside the onMessage method of a MDB set to tx
NotSupported, then redelivery does not occur.
The EJB2 spec is pretty silent about what should occur (17.6.3.1, 17.6.3.2) and only
really says that redeliver should occur if the onMessage is running in a tx context.
For the analogous case of a RuntimeException thrown from a non MDB (straightforward jms
MessageListener) onMessage method with ack mode of AUTO_ACKNOWLEDGE or
DUPS_OK_ACKNOWLEDGE, then the JMS 1.1 spec is pretty clear that redelivery should be
immediately attempted.
It seems to me that the current MDB container behaviour is a bit weird, since you end up
with messages remaining unacked in the connection consumers session until the mdb
container is redeployed.
A better and more intuitive behaviour IMHO would be to attempt to redeliver the message x
times then put it in the DLQ. Then at least the user can do something with it. Otherwise
it is effectively lost.
I would have thought that if the EJB spec is silent about one aspect of MDB delivery
behaviour we should fall back to what's specified in the JMS spec, rather than do
something completely different.
Or perhaps there's a good reason why redelivery isn't attempted in this situation
that I haven't thought about.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001004#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...