Terracotta for Spring

Thread Coordination Sample Application

About

The Thread Coordination sample application shows how to use Terracotta for Spring to coordinate processes across a cluster of nodes using plain Java synchronization.

Build Instructions

This sample application ships built ready to run.  If you modify the application code, use the provided build.xml file to re-build the application with Apache Ant (ant build).

Run Instructions

  1. Start the Terracotta Server from the samples directory

    Unix: ./start-demo-server.sh
    Windows: start-demo-server.bat
  2. Start Tomcat server nodes from the samples/spring/coordination directory

    Unix: ./start-tomcat1.sh
    ./start-tomcat2.sh

    Windows: start-tomcat1.bat
    start-tomcat2.bat

  3. View the sample Coordination application

    In a web browser, open http://localhost:8081/coordination/ for the first Tomcat server node and http://localhost:8082/coordination/ for the second Tomcat server node.

Source Code

Browse configuration file and source code: source.html