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 xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-6.xsd" xmlns:tc="http://www.terracotta.org/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 008:    <!--Server is colocated with client and DSO is listening on
 009:         default port (9510).-->
 010:    <servers>
 011:      <server host="%i" name="sample"/>
 012:    </servers>
 013:    <!--Tell DSO where to put the generated client logs.
 014:         See the Terracotta Configuration Guide and Reference for additional
 015:         information.-->
 016:    <clients>
 017:      <logs>terracotta/client-logs/pojo/coordination/%D</logs>
 018:    </clients>
 019:    <application>
 020:      <dso>
 021:        <!--Our app requires these custom objects/classes to be shared - the following declarations
 022:             tells DSO which ones they are. When the app runs under DSO, instances of these classes
 023:             will broadcast changes in their state.
 024:  
 025:             A good idiom when writing an app that you intend to cluster via TC DSO, is to group the 
 026:             classes you wish to share under a single package (although if you follow the MVC pattern
 027:             this tends to happen naturally) - this way the list of classes you wish to instrument
 028:             can be concise-->
 029:        <instrumented-classes>
 030:          <include>
 031:            <class-expression>demo.coordination.Main</class-expression>
 032:          </include>
 033:        </instrumented-classes>
 034:        <!--We declare the following fields a root, making it 
 035:             available for all instances of our app that runs via DSO-->
 036:        <roots>
 037:          <root>
 038:            <field-name>demo.coordination.Main.enterBarrier</field-name>
 039:          </root>
 040:          <root>
 041:            <field-name>demo.coordination.Main.exitBarrier</field-name>
 042:          </root>
 043:        </roots>
 044:      </dso>
 045:    </application>
 046:  </tc:tc-config>