• 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Calling remove() on an bean thats already removed

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic