Terracotta DSO

Shared JTable Sample Application

About

The Shared JTable sample application shows how to use Terracotta DSO to cluster a Java Swing application and use Terracotta Distributed Method Invocation (DMI) to propagate model data changes across the cluster.

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

The command-line steps below for executing scripts on Windows can be replaced by double-clicking the script instead.
  1. Start a Terracotta server from the samples directory.

    Unix: ./start-demo-server.sh
    Windows: start-demo-server.bat
  2. Start multiple copies of the application from the samples/pojo/jtable directory.

    Unix: ./run.sh &
    ./run.sh &

    Windows: run.bat
    run.bat

  3. View application.
    In one of the JTables, edit any of the cells to see the data replicated across all views of the data.

  4. Try out failover.
    Close all the JTables and restart one to see that the data persists across invocations of the client.

Source Code

Browse configuration file and source code: source.html