File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes about the onMessage method of MDB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "about the onMessage method of MDB" Watch "about the onMessage method of MDB" New topic
Author

about the onMessage method of MDB

carlo sciandrone
Greenhorn

Joined: Feb 26, 2012
Posts: 5
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

Joined: Dec 08, 2010
Posts: 47

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.


Regards,
Anirudh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about the onMessage method of MDB