Terracotta for Spring

JMX Sample Application

About

The JMX sample application shows how to use Terracotta for Spring to cluster Spring beans and advices and how to expose clustered data through JMX.

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 a 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/jmx directory.

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

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

  3. View application.

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

  4. From your JDK install directory, launch JConsole and connect to local JVM instances:

    Unix: bin/jconsole
    Windows: bin\jconsole.exe

Source Code

Browse configuration file and source code: source.html