Preparations
- Stop the Terracotta Server and the Terracotta Administration Console (if you still have them running).
- Have a look at the Terracotta configuration in ...\exploring-terracotta\helloworld\tc-config-concurrent-persistent.xml
Run the server in persistent mode
- Open a new Command Prompt window and add the Terracotta bin directory to your path:
> PATH=C:\Program Files\Terracotta\terracotta-2.4.3\bin;%PATH%
- Start the server with the persistent configuration file:
> cd ...\exploring-terracotta\helloworld > start-tc-server -f tc-config-concurrent-persistent.xml
- Start the Terracotta Administration Console like we did in exercise 1.
Run the client
- Open a new Command Prompt and add the Terracotta bin directory to your path:
> PATH=C:\Program Files\Terracotta\terracotta-2.4.3\bin;%PATH%
- Start the client:
> cd ...\exploring-terracotta\helloworld > dso-java -Dtc.config=tc-config.xml tutorial.HelloWorld
- The output will be something like this:
Hello, World Wed Aug 29 14:13:21 CEST 2007
Test the persistent mode
- Stop the server and start it again.
- You should also reconnect the admin console. The roots should have been read from the permanent store.
- Run the client again. The output should now include two dates.
- The persistent data is stored in the directory ...\exploring-terracotta\helloworld\data. Have a look at the contents of that directory.