• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFEJB - pg 564 - Exceptions: question 4.

 
Steven Colley
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!!!
 
Awishek sinha
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...
 
Napu Sun
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