Request Scope Service
Manages request-scoped container setup and lifecycle. Creates context-enriched instances of @RequestScoped services.
@RequestScoped
Two-Tier Container Architecture:
Container (manages global container) ↓ container.createRequestScope(routerContext) ↓Request Container (child, per request) ↓ Context-enriched instances via withContext(routerContext) Copy
Container (manages global container) ↓ container.createRequestScope(routerContext) ↓Request Container (child, per request) ↓ Context-enriched instances via withContext(routerContext)
Responsibilities:
Note:
Setup request-scoped container middleware
This MUST run before all other middleware and routes. Creates a child container with context-enriched service instances.
Request Scope Service
Manages request-scoped container setup and lifecycle. Creates context-enriched instances of
@RequestScopedservices.Two-Tier Container Architecture:
Responsibilities:
@RequestScopedservicesNote: