While going through EJB 3 in Action, i found that the supported acknowledgement modes for MDB are AUTO_ACKNOWLEDGE and DUPS_OK_ACKNOWLEDGE. CLIENT_ACKNOWLEDGE and SESSION_ACKNOWLEDGE are not supported as per page 130. Since the message is available in onMessage() method, i can still call message.acknowledge() which means CLIENT_ACKNOWLEDGE is working with MDB. Please correct me if i am wrong. So, CLIENT_ACKNOWLEDGE mode should be applicable to MDB. Why the it is classified as not supported with MDB?
Thanks in advance,
posted 5 years ago
Acknowledge modes are mostly ignored by the container. I think it mostly vendor dependent - for example in Jboss I have tried and it always retries messages when there is an exception regarless of acknowledge modes or transaction attributes.