Skip to content

TimPushkin/example-jetty

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portable CRaC: Jetty example application

Modified Jetty example to demonstrate the portable mode of CRaC.

How to run

  1. Compile:
    mvn package
  2. Checkpoint:
    # (shell 1) Launch
    $JAVA_HOME/bin/java -XX:CREngine="" -XX:CRaCCheckpointTo=cr \
      -Djdk.crac.resource-policies=res-policies.yaml \
      -jar target/example-jetty-1.0-SNAPSHOT.jar
    # (shell 2) Warm up
    curl localhost:8080
    # (shell 2) Checkpoint
    curl localhost:8080/checkpoint
    # (shell 1) Use Ctrl-C to stop the app
  3. Restore:
    # (shell 1) Restore
    $JAVA_HOME/bin/java -XX:CREngine="" -XX:CRaCRestoreFrom=cr \
      -Djdk.crac.resource-policies=res-policies.yaml \
      -jar target/example-jetty-1.0-SNAPSHOT.jar
    # (shell 2) Use the restored server
    curl localhost:8080

Additional information

For more information check:

About

Example of using portable CRaC with Jetty

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%