Multiple choice technology databases

Which of the following call backs are called for the stateful session bean?

  1. Construction

  2. Destruction

  3. Activation

  4. Passivation

  5. All the above

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

Stateful session beans in EJB (Enterprise JavaBeans) go through several lifecycle callbacks: Construction (when created), Destruction (when removed), Activation (when passivated bean is activated), and Passivation (when temporarily serialized to storage). All four lifecycle states have corresponding callback methods, making 'All the above' the correct answer.