On P 559 Client Scenarios (1) says the exception will be RemoteException for Remote i/f and EJBException for local when client calls a remove on an already removed bean.My doubt is why the NoSuchObjectException is not thrown ?
What are conditions under which it is thrown then because as per the book it is thrown when the client invokes a method on a home or component i/f when there is no underlying bean to support the object
I too think the NoSuchObjectException and NoSuchObjectLocalExcecption should be thrown. However in a question if these exceptions are not available, then it would not be wrong to say RemoteException (or EJBException) will be thrown because these are the parent classes.
The NoSuchEntityException Imran is talking about is something that you can throw from your bean method when you find that the underlying entity is no longer in the database(typically used in BMP entity beans). This will be rethrown by the container as a NoSuchObjectExcecption.