tc-config.xml (Client)
 
 001:  <?xml version="1.0" encoding="UTF-8"?>
 002:  <!--
 003:  
 004:  All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
 005:  
 006:  -->
 007:  <tc:tc-config xmlns:tc="http://www.terracotta.org/config"
 008:    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 009:    xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-6.xsd">
 010:    <!-- Server is colocated with client and DSO is listening on
 011:         default port (9510). -->
 012:    <servers>
 013:      <server host="%i" name="sample"/>
 014:    </servers>
 015:  
 016:    <!-- Tell DSO where to put the generated client logs.
 017:         See the Terracotta Configuration Guide and Reference for additional
 018:         information. -->
 019:    <clients>
 020:      <logs>terracotta/client-logs/pojo/jtable/%D</logs>
 021:    </clients>
 022:  
 023:    <application>
 024:      <dso>
 025:        <!-- The app requires these custom objects/classes to be shared - the following declarations
 026:             tell DSO which ones they are. When the app runs under DSO, instances of these classes
 027:             will broadcast changes in their state.
 028:  
 029:             A best practice (and an MVC pattern) when writing an app that you intend to cluster via Terracotta is to group the 
 030:             classes you want to share under a single package. This makes the list of instrumented classes more concise.
 031:  
 032:             The following <include> instruments all of the classes found in all of the
 033:             packages of our sample app. -->
 034:        <instrumented-classes>
 035:          <include>
 036:            <class-expression>demo.jtable..*</class-expression>
 037:          </include>
 038:        </instrumented-classes>
 039:  
 040:        <!-- We declare the field 'demo.jtable.Main.model' a root, making it 
 041:             available to all instances of our app that run via DSO. -->
 042:        <roots>
 043:          <root>
 044:            <field-name>demo.jtable.Main.model</field-name>
 045:          </root>
 046:        </roots>
 047:      </dso>
 048:    </application>
 049:  </tc:tc-config>