Hi,
I have a question regarding 'throw EJBException' from a business method.
In P.543 of HF
EJB, Bean Provider's responsibilitys (3), it says: " If your business logic catches an exception the client is not expecting, wrap it and rethrow it as an
EJBException". My question is if Bean should throw
EJBException for both Remote and Local client, or for Local client only? That is, if we should throw RemoteException for Remote client, and throw EJBException for Local client?
I met a question and was confused here:
SCBCD Practice Test . When explaining the answer, it says: "The difficult thing to do here is to decorticate the information contained in the question statement.
First, we know that the bean throws a javax.ejb.EJBException, so we know we are dealing with a local client. Therefore, we can eliminate choices C, D and E right away."
It sounds like if bean throws EJBException from a business method, it must have a local client.
Can anyone clarify it?
Thanks,
X. Li