Lecture 26 Demo: IoC Container and Bean Lifecycle

Interactive trace for create, inject, init, use, and destroy phases with lifecycle callback simulation.

1) Configure Lifecycle Scenario

Bean metadata:

Bean: reportService Type: ReportService Scope: singleton Callbacks: both

2) Lifecycle Mapping

  1. Container reads bean definition metadata.
  2. Bean instance is created based on scope.
  3. Dependencies are injected.
  4. Initialization callback runs.
  5. Business method executes during request.
  6. Destroy callback runs at context shutdown.

3) Runtime Trace

No lifecycle events yet. Click Start Context.

4) Bean Status

Bean Scope Init Destroy State
reportService singleton pending pending context not started