Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about the onMessage method of MDB

 
carlo sciandrone
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have a theoretical question about this method, I post it because I fear not having understood well the logic behind it.
Application exception are defined as exceptions which the client is expected to handle.
Any Exception can be made an application exception by annotating it with @ApplicationException.
A Message Driven Bean can throw only unchecked exceptions from its onMessage method so if I annotate my RuntimeException with @ApplicationException I can do it.
But a MDB does not have a client invoking it so does it make sense to have this possibility?
 
Anirudh Gupta
Ranch Hand
Posts: 49
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refer the below,

Chapter 5 - Message Driven Bean Component Contract
5.4 - Protocol Between a Message-Driven Bean Instance and its Container
5.4.18 - Dealing with Exceptions

The below URL is where you can download the EJB3.1 specs from.
EJB Specs

Hope it helps.

Regards,
Anirudh.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic