• Post Reply Bookmark Topic Watch Topic
  • New Topic

mock question  RSS feed

 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which exception is thrown when remote client tries to call remove() on a bean thats already been removed?

1) NoSuchObjectException
2) RemoteExcption
3) IlligalStateException
4) NoSuchEntityException

Whether both (1) and (2) are correct, or ONLY (1) is correct?

Thanks,
Prashant
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the question asks about selecting one option then first one is correct.

On the other hand one and two both are correct.

1) NoSuchObjectException
2) RemoteExcption

The container doesn't guarantee that the client will get NoSuchObjectException a remote client may get RemoteException.

Hope it helps.
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parshant, i had the same question: see here

Miki
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!