tc-config.xml (Client)
 
 001:  <?xml version="1.0" encoding="ISO-8859-1"?>
 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:    <!-- Server is colocated with client and DSO is listening on
 011:         default port (9510).-->
 012:    <servers>
 013:      <server host="%i" name="sample"/>
 014:      <update-check>
 015:        <enabled>true</enabled>
 016:      </update-check>
 017:    </servers>
 018:    
 019:    <!-- Configure DSO for 'development' mode;
 020:         See the Terracotta DSO Guide for additional information. -->
 021:    <system>
 022:      <configuration-model>development</configuration-model>
 023:    </system>
 024:  
 025:    <clients>
 026:      <!-- Tell DSO where to put the generated client logs
 027:           See the Terracotta Configuration Guide and Reference for additional
 028:           information.-->
 029:      <logs>terracotta/client-logs/rife/continuations/%D</logs>
 030:      <statistics>terracotta/client-statistics/rife/continuations/%D</statistics>
 031:      
 032:      <!-- Tell DSO to load the RIFE 1.6.0 module. -->
 033:      <modules>
 034:        <module name="tim-rife-1.6.0" version="1.1.3"/>
 035:      </modules>
 036:    </clients>
 037:    
 038:    <application>
 039:      <dso>
 040:        <!-- Our app requires these custom objects/classes to be shared - the following declarations
 041:             tells DSO which ones they are. When the app runs under DSO, instances of these classes
 042:             will broadcast changes in their state.
 043:  
 044:             A good idiom when writing an app that you intend to cluster via TC DSO, is to group the
 045:             classes you wish to share under a single package (although if you follow the MVC pattern
 046:             this tends to happen naturally) - this way the list of classes you wish to instrument
 047:             can be concise -->
 048:        <instrumented-classes>
 049:          <!-- Here, we're essentially saying, treat the all of the classes found in the: 'demo.continuations', 
 050:              package as shareable; For a "live" application, it would be a good idea to investigate 
 051:              and declar only the classes that absolutely must be available in the cluster. -->
 052:          <include>
 053:            <class-expression>demo.continuations.*..*</class-expression>
 054:          </include>
 055:        </instrumented-classes>
 056:        <!-- These methods (originating from local objects) operates on objects declared as shared. This
 057:             section tells DSO to assume a lock on those objects for the duration of the call; essentially this
 058:             section declares that all methods found for all classes found for all packages should assume the
 059:             behavior described -->
 060:        <locks>
 061:          <autolock>
 062:            <method-expression>* demo.continuations.*..*.*(..)</method-expression>
 063:            <lock-level>write</lock-level>
 064:          </autolock>
 065:        </locks>
 066:      </dso>
 067:    </application>
 068:  </tc:tc-config>