• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception caught in client different from Exception thrown from ejb  RSS feed

 
Zhongwu Lin
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question about Exception. Here is the situation:
In my stateless session I throws an exception like this:
throws new MyException(....);
MyException extends EJBException
When I caught it in servlet I got exception of type
java.rmi.ServerException
Question:
Why don't I got MyException ?
Thank you very much
 
Zhongwu Lin
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is because MyException is an EJBException which is a system level exception. It causes the transaction rollback and then container re-throw it with a wrapper.
regards
Zhongwu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!