Dashboard > J-Fall 2007 Workshop Terracotta > Home > Exercise 4 - Persistent Hello World
Exercise 4 - Persistent Hello World
Added by Vincent Partington, last edited by Vincent Partington on 09 Oct 2007  (view change)
Labels: 
(None)


Preparations

  1. Stop the Terracotta Server and the Terracotta Administration Console (if you still have them running).
  2. Have a look at the Terracotta configuration in ...\exploring-terracotta\helloworld\tc-config-concurrent-persistent.xml

Run the server in persistent mode

  1. 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%
  2. Start the server with the persistent configuration file:
    > cd ...\exploring-terracotta\helloworld
    > start-tc-server -f tc-config-concurrent-persistent.xml
  3. Start the Terracotta Administration Console like we did in exercise 1.

Run the client

  1. 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%
  2. Start the client:
    > cd ...\exploring-terracotta\helloworld
    > dso-java -Dtc.config=tc-config.xml tutorial.HelloWorld
  3. The output will be something like this:
    Hello, World Wed Aug 29 14:13:21 CEST 2007

Test the persistent mode

  1. Stop the server and start it again.
  2. You should also reconnect the admin console. The roots should have been read from the permanent store.
  3. Run the client again. The output should now include two dates.
  4. The persistent data is stored in the directory ...\exploring-terracotta\helloworld\data. Have a look at the contents of that directory.

Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.2 Build:#516 31 May 2006) - Bug/feature request - Contact Administrators