(see HF EJB p.550)
... container is free to choose if it wants to give more specific
exception. But I thought it was talking in context of exceptions
like DuplicateKeyException which is a subclass of CreateException
and ObjectNotFoundException which is subclass of FinderException.
The java.rmi.NoSuchObjectException is a subclass of the java.rmi.RemoteException.
It is thrown to the client if a remote business method
cannot complete because the EJB object no longer exists.
(see EJB spec 7.6.0)
When the client calls remove on the home or component interface to remove
the session object, the container issues ejbRemove() on the bean instance.
This ends the life of the session bean instance and the associated session
object. Any subsequent attempt by its client to invoke the session object
causes the java.rmi.NoSuchObjectException to be thrown if the client is a
remote client, or the javax.ejb.NoSuchObjectLocalException if the client is
a local client. (The java.rmi.NoSuchObjectException is a subclass of the
java.rmi.RemoteException; the javax.ejb.NoSuchObjectLocalException is a
subclass of the javax.ejb.EJBException). The ejbRemove() method cannot be
called when the instance is participating in a transaction. An attempt to
remove a session object while the object is in a transaction will cause the
container to throw the javax.ejb.RemoveException to the client. Note that a
container can also invoke the ejbRemove() method on the instance without a
client call to remove the session object after the lifetime of the EJBobject has expired.