It's from an excercise where you are supposed to guess what kind of exception might occur for specific scenarios.
The scenario:
"Client calls remove() on a bean that's already been removed"
The explanation:
"You might be tempted to say RemoveException, but that's not it. Remember, remove() is just another method in the bean's interface, and if you call it on a removed bean, you'll get the same exception you'd see if you called any other business method on a removed bean - remote clients get RemoteException and local clients get EJBException."
I understand the part about not receiving a RemoveException. However, I thought this was a case for NoSuchObjectException or NoSuchObjectLocalException. I would assume they should be used instead of RemoteException or EJBException in the same way that the more specific exceptions ObjectNotFoundException and DuplicatKeyException are used instead of their more generic parent exceptions FinderException and CreateException when a single-ref finder/select fails or bean creation fails.
Can anyone clarify ?
Br,
Sven T.