== 3. The fix: open in start(), close in stop() (profile 'managed'), checkpoint with jcmd, restore orders before checkpoint; audit file has 3 lines --- log of the checkpointed process (hooks only) INFO 11435 --- [crac-demo] [ main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 18771 (http) INFO 11435 --- [crac-demo] [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] INFO 11435 --- [crac-demo] [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.27] INFO 11435 --- [crac-demo] [ main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 18771 (http) with context path '/' ManagedAuditLog: opened /audit.log INFO 11435 --- [crac-demo] [io-18771-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' ManagedAuditLog: closed /audit.log RestoreTracker: beforeCheckpoint --- log of the restored process (hooks only) RestoreTracker: afterRestore (restore #1) INFO 11435 --- [crac-demo] [Attach Listener] o.s.c.support.DefaultLifecycleProcessor : Restarting Spring-managed lifecycle beans after JVM restore INFO 11435 --- [crac-demo] [Attach Listener] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 18771 (http) with context path '/' ManagedAuditLog: opened /audit.log INFO 11435 --- [crac-demo] [Attach Listener] o.s.c.support.DefaultLifecycleProcessor : Spring-managed lifecycle restart completed (restored JVM running for 93 ms) --- after restore: new order (id continues from the checkpointed counter), audit file now has 4 lines: {"id":4,"customer":"ada","sku":"X","quantity":1} created order 1 created order 2 created order 3 created order 4