Hi, I didn't find nowhere how the acknowledge process of a MDB occurs when we are working with CMT and we declare the onMessage() method NotSupported. Does it occur? When? At the end of the onMessage()? At the beginning of onMessage()? Is it undefined? Also, is the <acknowledge-mode> tag value going to be considered in this case? Thank you in advance, Dani Mazzuca [ April 05, 2004: Message edited by: Dani Mazzuca ]
I didn't find nowhere how the acknowledge process of a MDB occurs when we are working with CMT and we declare the onMessage() method NotSupported. The section 15.4.8 of the EJB spec 2.0 states:
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.
Now, since NotSupported is specified, the container will not execute the onMessage() method within a transaction. The EJB specification does not prescribe how containers should execute methods in an unspecified transaction context (section 17.6.5). The spec only gives some possible techniques that container providers may use. Thus, your question cannot be answered based on the EJB spec only since what happens in such a case is let open to the different implementors. Not very helpful, but anyway...