GM. Below is a question/detailed answer from ejbcertificate.com. My confusion is on answer #1. Why is #1 right? Is it not true that the compiler will provide the default constructor(in the absense of Bean Provider not providing the same) and why the Bean provider "must" provide the same? I looked at the example code given in HFEJB and that too does not provide a constructor. Please suggest...
========================================================================= Which of the following methods must the entity bean provider implement in the abstract entity bean class?
Incorrect, you chose answer 4. The correct answers are 1,4.
1) The entity bean provider must provide a public constructor without arguments. 2) The entity bean provider must provide at least one implementation for the ejbCreate() method. 3) The entity bean provider must provide the implementation of the ejbFind() method(s). 4) The entity bean provider must provide the implementation of the ejbHome() method(s). 5) The entity bean provider must provide at least one ejbSelect() method.
Answers 1 and 4 are correct.
Answer 2 is incorrect, there are zero or more ejbCreate() methods, whose signatures match the signatures of the create() methods of the entity bean's home interface.
Answer 3 is incorrect, the bean provider of an entity bean with container-managed persistence does not write the finder methods. The finder methods are generated at the entity bean deployment time using the Container Provider's tools.
Answer 5 is incorrect, the Bean Provider may provide zero or more select methods. A select method is a query method that is not directly exposed to the client in the home or component interface. The bean provider typically calls a select method within a business method. The bean provider defines the select methods as abstract methods. =========================================================================
I also agree that the first option is confusing; To avoid confusion, I read it this way "Bean Provider must not provide any constructors with arguments so that the compiler will give the default no-arg constructor or the bean provider himself can do that". And I'm pretty sure that the real exam does not give ambiguous questions like this