If you don't want a redelivery in general you can configure the retry for DLQ (DeadLetterQueue), default is 10.
I set the message selector with a check for redelivery counter (don't know the exactp property ATM).
In this case I deploy a seccond MDB to handle the redilivered messages.
Yeah, so is there a place that says "Here are the settings for MDB, this is for JMS", etc? It seems like there are multiple places where these values can be configured, and I only see they have worked/failed at the worst time (in production). It also seems like this configuration varies between versions, and the web has a wonderful memory of these different configs.
I have been trying this for a while. As someone who does occasionally produce open source software, I get annoyed when people complain about open source docs, but, you know. Its surprisingly opaque on this issue. I'd think "just do it once" would be pretty simple.
Since each version of JBoss AS ships a different JMS provider, these properties keep changing.
You are using JBoss AS 4.x, so this might help http://docs.jboss.org/ejb3/docs/tutorial/mdb/mdb.html (check the dLQMaxResent activation config property).