File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Mdb and runtime exceptions 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 "Mdb and runtime exceptions" Watch "Mdb and runtime exceptions" New topic

Mdb and runtime exceptions

Cristian Popovici
Ranch Hand

Joined: Apr 13, 2007
Posts: 32
Hi guys,

I have messages processed by a message driven bean. I want, when an processing occurs due to invalid data in the message (a runtime exception is thrown by the mdb), the sender to get notified about this failed message. Is this possible using the JMS infrastucture?

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

It's asynchronous processing. So the piece of code which sent the message to the queue/topic will not know about this exception. However, the container/server responsible for sending the message from the queue to the MDB will know of this and can redeliver the message to the MDB.

[My Blog] [JavaRanch Journal]
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
How about sending a message back to the sending application about a data error.
I agree. Here's the link:
subject: Mdb and runtime exceptions
jQuery in Action, 3rd edition