Hi Ivan, You can't do that. It'd be against the EJB specifications. See below:
5.4.14 Message Acknowledgment for JMS Message-Driven Beans JMS message-driven beans should not attempt to use the JMS API for message acknowledgment. Message acknowledgment is automatically handled by the container. If the message-driven bean uses container- managed transaction demarcation, message acknowledgment is handled automatically as a part of the transaction commit. If bean-managed transaction demarcation is used, the message receipt cannot be part of the bean-managed transaction, and, in this case, the receipt is acknowledged by the container. If bean-managed transaction demarcation is used, the Bean Provider can indicate whether JMS AUTO_ACKNOWLEDGE semantics or DUPS_OK_ACKNOWLEDGE semantics should apply by using the activationConfig element of the MessageDriven annotation or by using the activation- config-property deployment descriptor element. The property name used to specify the acknowledgment mode is acknowledgeMode. If the acknowledgeMode property is not specified, JMS AUTO_ACKNOWLEDGE semantics are assumed. The value of the acknowledgeMode property must be either Auto-acknowledge or Dups-ok-acknowledge for a JMS message-driven bean. Regards Sachindra -----Original Message----- From: Ivan Pechorin [mailto:ivan.pecho...@gmail.com] Sent: Monday, April 19, 2010 5:56 PM To: users@activemq.apache.org Subject: ActiveMQ RA: how to make MDB with CLIENT_ACKNOWLEDGE? Hello We have a message-driven bean in JBoss with ActiveMQ resource adapter (RA). It seems like ActiveMQ RA 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 happened inside method onMessage() of my MDB. How can I achieve this? P.S. Any help of link to proper piece of documentation is highly appreciated (I failed to find it). Best regards, Ivan -- View this message in context: http://old.nabble.com/ActiveMQ-RA%3A-how-to-make-MDB-with-CLIENT_ACKNOWLEDGE--tp28287660p28287660.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. Confidentiality notice: This message may contain confidential information. It is intended only for the person to whom it is addressed. If you are not that person, you should not use this message. We request that you notify us by replying to this message, and then delete all copies including any contained in your reply. Thank you.