Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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 ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

HFEJB - pg 564 - Exceptions: question 4.  RSS feed

 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks, i have a question regarding question 4.

OPTION B: Beans methods should wrap unrecoverable checked exceptions in a javax.ejb.JBException.

for me "unrecoverable checked exceptions" means :
- RemoteException and its Sublclasses such as:
- NoSuchObjectException
- TransactionRequiredException
- TransactionRolledbackException

First, does it make sense?

Second, if the first question is correct...why should i be wrapping the execptions above in a EJBException ? Besides, why should i be wrapping the execptions above in a EJBException if the client was a remote client??

Please guys advice!!!

Tks so much!!!
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Felipe
To me Unrecoverable checked exception means not only remote exception it can be any checked application exception from which the bean method could not recover. so if such exception occur the client can't do anything in catch block so as to avoid handling the exception at client end the bean method wraps that exception in javax.ejb.EJBException and throws that to container & depending upon the client is local or remote the container throw back the EJBException or RemoteException...
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HFEJB, page 543 and 546 have your answer
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!