In order to use Container Managed Relations (CMR) fields in CMP entity beans, the developer Must

  1. declare the CMR member fields and add ejb-relationship definitions in the deployment descriptor

  2. implement the get/set methods for the CMR fields and add ejb-relationship definitions in the deployment descriptor

  3. implement the ejbLoad() and ejbStore() methods and add ejb-relationship definitions in the deployment descriptor

  4. declare abstract get/set methods for the CMR field and add ejb-relationship definitions in the deployment descriptor


Correct Option: D

AI Explanation

To use Container Managed Relations (CMR) fields in CMP entity beans, the developer must:

D. Declare abstract get/set methods for the CMR field and add ejb-relationship definitions in the deployment descriptor.

Explanation: CMR fields in CMP entity beans are used to define relationships between entity beans. To use CMR fields, the developer needs to declare abstract get/set methods for the CMR field. These abstract methods will be implemented by the container to manage the relationship between the entities.

Additionally, the developer also needs to add ejb-relationship definitions in the deployment descriptor. The deployment descriptor is an XML file that contains configuration information for the EJB module, including the definition of relationships between entity beans.

Therefore, option D is the correct answer.

Find more quizzes: