Entity Beans   «Prev  Next»

Finding Entity Bean - Quiz

1. Which of the following statements about JPA entities in Jakarta EE 11 are true?
Please select all the correct answers.
  A. Each client has a one-to-one relationship with an entity instance.
  B. A JPA entity has a one-to-one relationship with the underlying database row.
  C. Calling EntityManager.remove() deletes the entity and its underlying data.
  D. JPA entity instances are discarded when the container crashes.

2. Which of the following statements about primary keys in JPA 3.2 are true?
Please select all the correct answers.
  A. The primary key class must be RMI IIOP compliant.
  B. EntityManager.find() uses the primary key to locate the entity instance.
  C. The primary key is retrieved from the EJBObject.
  D. The primary key uniquely identifies both the entity instance and its underlying data.

3. What does EntityManager.find(Employee.class, id) return in JPA 3.2 when a matching record exists?
Please select the best answer.
  A. The home object reference
  B. A managed entity instance of the specified type
  C. void
  D. The primary key