Skip to content

Property-driven onRefresh checkpoint during application context bootstrap #30606

Closed
@jhoeller

Description

@jhoeller

In addition to the flexible CRaC lifecycle integration in #30242, allowing for custom checkpoints, we have identified a common checkpoint option out of the box: in LifecycleProcessor.onRefresh, right before the lifecycle start phase, with all non-lazy beans initialized but no async workers having started yet. No actual stopping and restarting will be necessary at that point yet, in contrast to later checkpoints, making this option attractive for fast bootstrapping (just without any warming up beyond that).

A "spring.context.checkpoint" property with an "onRefresh" value could trigger such a checkpoint automatically. This can easily be used in application-specific build arrangements. The property will only trigger the checkpoint; the inclusion and distribution of the checkpoint image file is up to the individual application then.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions