Hi, I'm due to take my SCBCD exam tomorrow and have a question about the Final Mock Exam question number 38 in 'Head First EJB'. The question goes as follows: 38. Which must be included in every ejb-jar file? (Choose all that apply.) A. The stub for the EJBHome interface, either directly or by reference. B. The JAR Manifest file. C. A deployment descriptor. D. The JNDI context. E. The EJB's home interface, either directly or by reference. I know that the answer is C and E but what is meant by 'either directly or by reference' in answers A and E. Surely the class or interface is either included or not??? I am confused.... Mark
Directly means you include the compiled classes of the interface. By reference means: (This is what got from the Spec Pg 488) "We say that a jar file contains a second file �by reference� if the second file is named in the Class-Path attribute in the Manifest file of the referencing jar file or is contained (either by inclusion or by reference) in another jar file that is named in the Class-Path attribute in the Manifest file of the referencing jar file." Really speaking I did'nt understand what it means but this is what the spec says.
I'm sure I saw a question earlier in the book (or perhaps it was Whizlabs) where answer e was considered invalid because the ejb-jar could contain only message-driven beans, and the question uses the words "must be included".
If the question were changed to "Which must be included in every ejb-jar file that contains session or entity beans?" only then could I see e being a valid answer.
David Gadd (3 days away from taking the exam!)
It was the best of times. It was the worst of times. It was a tiny ad.
Devious Experiments for a Truly Passive Greenhouse!