Comsat Examples
Java JavaScript HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
comsat-examples-db
comsat-examples-dropwizard
comsat-examples-embeddedjetty
comsat-examples-jaxrs
comsat-examples-jetty-webactor
comsat-examples-retrofit
comsat-examples-servlet 🐛 Fix servlet API deps that were causing classloading issues Oct 22, 2015
comsat-examples-spaceships
comsat-examples-webactors-codeswap
comsat-examples-webactors
embedded-tomcat - Oct 22, 2015
modules
test-servlet
.gitignore
README.md
build.gradle
common.gradle
log4j.xml initial commit Jan 21, 2014
settings.gradle

README.md

COMSAT Examples

This project includes some examples that makes use of an embedded Jetty servers and several others that are packaged into WAR files and can be deployed to servlet containers.

Running the Jetty examples

In the shell:

gradle :comsat-examples-embeddedjetty:run

A Jetty web actors example can be run with:

gradle :comsat-examples-jetty-webactor:run

A Dropwizard example can be run with:

gradle :comsat-examples-dropwizard:runSimple

Non-web examples

gradle :comsat-examples-db:runSimple
gradle :comsat-examples-retrofit:runSimple

Running the WAR examples

For convenience, we've included a tiny program (embedded-tomcat) that runs a Tomcat server, creates a database, and compiles and deploys all WAR examples.

In the shell, type:

gradle :embedded-tomcat:run

Then, in a web browser, access any of the following links:

Hot Code Swapping

  1. Open an new shell and build the upgrade module:
gradle :comsat-examples-webactors-codeswap:jar
  1. Run and access http://localhost:8080/comsat-examples-webactors/webactor as explained above.

  2. Copy the upgrade module jar file into the modules/ directory:

cp comsat-examples-webactors-codeswap/build/libs/comsat-examples-webactors-codeswap.jar modules

You will now see the new actor behave differently in the test web page.

Running Spaceships

Stop the server if running and uncomment the following line in embedded-tomcat/build.gradle:

from project(":comsat-examples-spaceships").war

Restart the server with:

gradle :embedded-tomcat:run

Then, open http://localhost:8080/comsat-examples-spaceships/login in your browser.

License

These examples are released under the MIT license.

Copyright (c) 2014-2015 Parallel Universe