Sorry for the late reponse, other tasks kept me from getting back to this piece of code :(
I've now set useDLQ=false on the MDB, and indeed, now redelivery attempts aren't limited to 5. I get the impression that redelivery attempts now go on forever. In this particular case, that may be preferable to 'only 5 times', maybe. However, generally, infinite message redelivery attempts aren't always acceptable.
What I would really want is that the config in messaging-service.xml , attribute "DefaultMaxDeliveryAttempts" , is respected (or some more fine-grained config, per queue or per MDB).
I saw some reports which maybe indicate this is a known problem in AS 5. Can anyone confirm this?