Skip to content

Commit f77713b

Browse files
committed
Document testing automatic checkpoint/restore at startup
Closes gh-31724
1 parent dc5bef1 commit f77713b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

framework-docs/modules/ROOT/pages/integration/checkpoint-restore.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ startup during the `LifecycleProcessor.onRefresh` phase. After this phase has co
2929
`InitializingBean#afterPropertiesSet` callbacks have been invoked; but the lifecycle has not started, and the
3030
`ContextRefreshedEvent` has not yet been published.
3131

32+
For testing purpose, it is also possible to leverage the `-Dspring.context.exit=onRefresh` JVM system property which
33+
triggers a similar behavior, but instead of creating a checkpoint, it exits your Spring application at the same lifecycle
34+
phase without requiring the Project CraC dependency/JVM or Linux. This can be useful to check if connections to remote
35+
services are required when the beans are not started, and potentially refine the configuration to avoid that.
36+
3237
WARNING: As mentioned above, and especially in use cases where the CRaC files are shipped as part of a deployable artifact (a container image for example), operate with the assumption that any sensitive data "seen" by the JVM ends up in the CRaC files, and assess carefully the related security implications.
3338

3439
NOTE: Automatic checkpoint/restore is a way to "fast-forward" the startup of the application to a phase where the application context is about to start, but it does not allow to have a fully warmed-up JVM.

0 commit comments

Comments
 (0)