• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception Handling

 
Waldle Cai
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing a multi-layers J2EE App as following:
JSP->JavaBean->SessionBean->CMP Entity Bean
Entity Bean throws a RomoteException, which is caused by DB Uniqueness violation, SessionBean can catch it rethorw it as an application exception to the JavaBean. But the problem is that the JavaBean always get a RemoteException instead of application exception.
I know this is very common exception handling. But I really don't know why it doesn't work as expected. Do you guys have any idea?
Thanks and Regards
Waldle
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO, we should catch RemoteException and re-throw it as EJBException.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!