First, if you want to be able to snapshot your application, you must provide the path of the generated checkpoint when you launch your Java application with the following VM argument:Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
- Manually from outside the application with the following command:
jcmd <myApp.jar/PID> JDK.checkpoint.
The execution of this command ends quickly but your application is still paused while its state is being copied to the disk. - Automatically after Spring initialization but right before the application is started by adding this system property
while launching your application:
-Dspring.context.checkpoint=onRefresh.
It is not recommended as manual checkpoints usually provide better performance, as explained in the official documentation. - Programmatically within your application with the CRaC API:
org.crac.Core.checkpointRestore().
This method triggers a checkpoint and returns when the restore is completed.