Bean Managed Persistence   «Prev  Next»

Callbacks EJB Remove - Quiz

Container callbacks

 
Each question is worth one point. Select the best answer or answers for each question.

1. What is it usual to do in the method setEntityContext()?
Please select the best answer.
  A. Nothing
  B. Confirm the instance was created
  C. Allocate resources required by the instance during its lifetime
  D. Store the primary key

2. Which of the following statements are true for ejbActivate() for entity beans?
Please select all the correct answers.
  A. The instance is retrieved from secondary storage.
  B. The instance allocates any resources required.
  C. The container can call ejbActivate() at any time.
  D. Before invoking ejbActivate() on an instance, the container takes it from the pool and associates with a specific entity object identity.

3. When is ejbStore() invoked?
Please select the best answer.
  A. Anytime the container wants to invoke it
  B. Just prior to a transaction being committed
  C. Just after the instance variables are updated by a business method
  D. Never