Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Exception Handling

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
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.
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic