My onMessage method of MDB calls session bean that performs database operations.
Some database errors (constraint violation, etc.) are normal cases and should not cause message redelivery. So I wrapped the whole onMessage code into the try..catch . But even if I catch all Exceptions and even Throwables, message is being redelivered.
When no error happens, it is not being redelivered.
How to avoid this unwanted redelivery ?