This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Mdb and runtime exceptions" Watch "Mdb and runtime exceptions" New topic
Author

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?

Thanks,
Cristian
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9912
    
158

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.
 
jQuery in Action, 2nd edition
 
subject: Mdb and runtime exceptions
 
Similar Threads
Create directories (MDB or servlet)
Message Selectors
What is the relationship between JMS and MDB?
JMS Priority
Message Selectors in MDB