user13394165 wrote:Use Container Managed Transactions, set the transaction attribute to required and call setRollbackOnly() on the MessageDrivenContext object.
It seems like MDB doesn't support CLIENT_ACKNOWLEDGE mode. It supports only DUPS_OK_ACKNOWLEDGE and AUTO_ACKNOWLEDGE modes.
Basically, I need to be able to leave a message in queue if something bad happenes or my business logic fails inside method onMessage() of my MDB. In short, I want container to redeliver that message to my mdb. So how can I achieve this?