It is stated in the EJB 2.0 specifications on how to handle such situation whereby the bean encountered a checked exception & it cannot recover. Check out page 373. The 2nd bullet point clearly states what it should do: throw EJBException that wraps the original.
You should read the specifications if you wish to do well in the exams. It really helps a lot. I think this was also mentioned in the HFEJB book somewhere, although I can't give you the exact page number off-hand. [ April 04, 2005: Message edited by: Chengwei Lee ]
I read the spec on page 373, and I re-read the information on application exceptions in HFEJB on page 541.
I believe that the mock exam question #67 is unfortunately ambiguous, because it doesn't state whether the checked exception we are talking about is DECLARED IN THE METHOD SIGNATURE.
If it is NOT declared in the method signature, AND it is a checked exception that is not recoverable, then yes, it makes sense and concurs with page 373 of the spec that it should be wrapped in EJBException (answer c). BUT if the checked exception IS DECLARED, and it is not recoverable, then just propagate that same exception to the container (answer d).
brevity is the soul of wit - shakepeare. Tiny ad:
ScroogeXHTML 9.0 - RTF to HTML5 and XHTML converter