This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MDB acknowledge in CMT, with onMessage() declared NotSupported?  RSS feed

 
Dani Mazzuca
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!