• Post Reply Bookmark Topic Watch Topic
  • New Topic

Application Exceptions in MDB

 
Fazia Betouche
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What happened if an application exception is thrown in a message driven bean method (other than the onMessage)?
Thank you.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't matter if the actual source is the onMessage() or some other method -- the invocation has in any case come through the onMessage() method and is subject to the rules stated in the EJB specification. And... because the onMessage() method is not allowed to declare any application exceptions to be thrown, it must swallow any application exceptions thrown by helper methods.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!