Bean Managed Persistence   «Prev  Next»

 

Creating, Finding Entity Objects - Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. Which of the following statements are true for the ejbCreate(args...) method?
Please select all the correct answers.
  A. There can only be one ejbCreate() method.
  B. There can be zero ejbCreate() methods.
  C. There can be many ejbCreate() methods.
  D. ejbCreate() always returns a primary key object.

2. Which of the following statements are true regarding the ejbPostCreate() method?
Please select the best answer.
  A. It is called immediately after the ejbCreate() method and before any other callback.
  B. It gives access to the instance's remote EJBObject reference.
  C. The EntityContext is called after the ejbPostCreate() method.
  D. There are no arguments for the ejbPostCreate() method.

3. Which of the following statements are true for the ejbFindByPrimaryKey(PrimaryKey) method in bean-managed persistence?
Please select all the correct answers.
  A. A primary key can be a primitive type or a valid Java type.
  B. The primary key is used to look up the entity object from the persistent store.
  C. The ejbFindByPrimaryKey(PrimaryKey) returns an EJBObject.
  D. The ejbFindByPrimaryKey(PrimaryKey) may find more than one entity object.