Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Including interfaces in a jar file by reference?

 
Mark Newton
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sudhir V
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Gadd
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks,

David Gadd
(3 days away from taking the exam!)
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!