Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Application Exceptions

 
nitin pai
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if I declare a custom Exception and throw it in the method of an EJB. Will it reach my client if it calls the EJB remotely?
Or will a remote exception be throw in such a case?
 
bernard savary
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi nitin
It depends whether your exception is a checked or unchecked exception . In case of checked exception it will reach the client , in case of unchecked it will be considered as system exception and a EJBException will be sent to the client. However we can have a unchecked exception propagate to client as it is by marking it with @ApplicationException .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic