Acknowledging Messages from Message-Driven Beans
You should not use the client message acknowledgment methods defined in the JMS API to acknowledge messages to the client. Because there is no direct connection between the client and the message-driven bean, the container handles the message acknowledgment automatically. That way, the container handles it depending on whether you are using container-managed transaction demarcation or bean-managed demarcation.
If you are using container-managed transactions, the container will acknowledge the message as part of the transaction commit; however, you should set the bean’s transaction attribute to Required. If you are using bean-managed transactions, the acknowledgment can’t be part of the transaction ...
Get Special Edition Using Enterprise JavaBeans™ 2.0 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.