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