This content has been marked as final. Show 2 replies
You say you are using a bean managed transaction - so you are calling begin and commit from onMessage. In that case the message is delivered to the MDB outside that transaction (using auto-acknowledgement by default). This means that rolling back the transaction should not cause the message to be redelivered. Is your bean throwing an exception? That (and not the rollback) might be what is causing the message to be redelivered.
The answer to your question is message broker specific. There was a message redelivery setting in JBoss 4.2.3, but that does not guarantee it is going to exist in all JMS implementations out there.