[jboss-user] [JBoss Messaging] - MDB doesn't catch exceptions

bob82 do-not-reply at jboss.com
Fri Jan 12 05:51:43 EST 2007


Hi everybody,
i have a problem: i have a MDB that, after receiving messages from a queue, calls an EJB method to store on DB.
If the storing raise an exception the ejb doesn't catch the exception, but the transaction rollbacks and, after 10 times, the message is sent to DLQ, without advise.
In server.log i see the SQL exceptions, but at code level i can't.

The code in EJB is:


  | try {
  | 	entManager.merge(mail);
  | } catch (Exception e) {
  |        ejbContext.setRollbackOnly();
  | 	throw new DBStoringException("Error update", e);
  | }
  | 

Does anyone know how can i be advised of failures?

thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000848#4000848

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000848



More information about the jboss-user mailing list