Multiple choice java

CMP fields in EJB 2.x are defined via

  1. static fields in the entity bean

  2. an abstract persistence schema

  3. EJB Query Language definitions in the deployment descriptor

  4. the persistence-type attribute in the deployment descriptor

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In EJB 2.x, Container-Managed Persistence (CMP) fields are not declared as variables in the bean class. Instead, they are defined as virtual properties via abstract getter and setter methods. The actual mapping and field definitions are specified in the deployment descriptor's abstract persistence schema.