• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling remove() on an bean thats already removed

 
Nileesha Bojjawar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In HFEJB, I am reading exceptions and at Pg552, NoSuchObjectLocalExcpetion or NoSuchObjectExeception is thrown if we invoke any method on the already removed bean, whereas on page 559, It says if Client calls remove() on a bean thats already removed, remote Client gets RemoteException and local client get EJBException. My confusion is Shouldnt a local client get NoSuchObjectLocalException and a remote client get NoSuchObjectException.

Thanks
 
Vaithiya Sundaram
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NoSuchObjectException extends RemoteException
NoSuchObjectLocalException extends EJBException

so both are correct.
NoSuchObjectException and NoSuchObjectLocalException are specific detail whereas RemoteException/EJBException are generic detail.

Based on the question and answers given, you should choose the best suitable answers.

Vaithiya
 
Nileesha Bojjawar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply,
But if both are given like in teh exercise in HFEJB, Which one must be chosen, as i chose NoSuchObjectException and the answer stated RemoteException

Thanks
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't worry, in the exam, there won't be any spacial cases as the one you mentioned.
Pay special attention to the wording of the question, though!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic