On page 130 of head first EJB it is mentioned that if a session bean client calls remove(Object primaryKey) then the client gets a javax.ejb.RemoveException
However the API defines remove as : public void remove(java.lang.Object primaryKey) throws java.rmi.RemoteException,RemoveException
and its description says: "Remove an EJB object identified by its primary key. This method can be used only for an entity bean. An attempt to call this method on a session bean will result in a RemoteException."
Is this an error or is it something I am missing?I did not find it in March 18, 2005 errata as well.
I think it has got something to do with what is explained in Page 545. Please read on and tell me if that is so. And after that I think if you could refer to page 59 of specification which states that:
Because session objects do not have primary keys that are accessible to clients, invoking the javax.ejb.EJBHome.remove(Object primaryKey) method on a session results in the javax.ejb.RemoveException.