<?xml version="1.0" encoding="UTF-8"?>
<tc:tc-config xmlns:tc="http://www.terracotta.org/config">
<!--Tell DSO where the Terracotta server can be found;
See the Terracotta DSO Guide for additional information.-->
<servers>
<server name="localhost">
<data>data/server-data</data>
<logs>logs/server-logs</logs>
</server>
</servers>
<!--Tell DSO where to put the generated client logs
See the Terracotta DSO Guide for additional information.-->
<clients>
<logs>logs/client-logs/%(webserver.log.name)</logs>
</clients>
<application>
<dso>
<!--Our app requires these custom objects/classes to be shared - the following declarations
tells DSO which ones they are. When the app runs under DSO, instances of these classes
will broadcast changes in their state.
A good idiom when writing an app that you intend to cluster via TC DSO, is to group the
classes you wish to share under a single package (although if you follow the MVC pattern
this tends to happen naturally) - this way the list of classes you wish to instrument
can be concise-->
<instrumented-classes>
<include>
<class-expression>*..*</class-expression>
<honor-transient>true</honor-transient>
</include>
<exclude>org.apache.coyote..*</exclude>
<exclude>org.apache.catalina..*</exclude>
<exclude>org.apache.jasper..*</exclude>
<exclude>org.apache.tomcat..*</exclude>
<include>
<class-expression>java.net.URL</class-expression>
<honor-transient>true</honor-transient>
<on-load>
<execute>if ((self.handler = self.getURLStreamHandler(self.protocol)) == null) {
throw new IOException("unknown protocol: " + self.protocol);
}
// Construct authority part
if (self.authority == null &&
((self.host != null && self.host.length() > 0) || self.port != -1)) {
if (self.host == null)
self.host = "";
self.authority = (self.port == -1) ? self.host : self.host + ":" + self.port;
// Handle hosts with userInfo in them
int at = self.host.lastIndexOf('@');
if (at != -1) {
self.userInfo = self.host.substring(0, at);
self.host = self.host.substring(at+1);
}
} else if (self.authority != null) {
// Construct user info part
int ind = self.authority.indexOf('@');
if (ind != -1)
self.userInfo = self.authority.substring(0, ind);
}
// Construct path and query part
self.path = null;
self.query = null;
if (self.file != null) {
// Fix: only do this if hierarchical?
int q = self.file.lastIndexOf('?');
if (q != -1) {
self.query = self.file.substring(q+1);
self.path = self.file.substring(0, q);
} else
self.path = self.file;
}</execute>
</on-load>
</include>
</instrumented-classes>
<locks>
<autolock>
<method-expression>* *..*(..)</method-expression>
</autolock>
</locks>
<web-applications>
<web-application>Cart</web-application>
<web-application>DepartmentTaskList</web-application>
<web-application>Townsend</web-application>
<web-application>wicket-examples-1.2.2</web-application>
</web-applications>
<additional-boot-jar-classes>
<include>java.util.Locale</include>
<include>java.awt.Font</include>
<include>java.net.URL</include>
<include>java.text.SimpleDateFormat</include>
<include>java.text.DateFormat</include>
<include>java.text.Format</include>
<include>java.text.DateFormatSymbols</include>
<include>java.text.DecimalFormat</include>
<include>java.text.NumberFormat</include>
<include>java.util.GregorianCalendar</include>
<include>java.util.Calendar</include>
<include>java.text.DecimalFormatSymbols</include>
<include>sun.util.calendar.ZoneInfo</include>
<include>java.util.TimeZone</include>
<include>java.util.SimpleTimeZone</include>
<include>sun.net.www.protocol.http.Handler</include>
<include>java.net.URLStreamHandler</include>
<include>sun.util.calendar.Gregorian</include>
<include>sun.util.calendar.BaseCalendar</include>
<include>sun.util.calendar.AbstractCalendar</include>
<include>sun.util.calendar.CalendarSystem</include>
<include>java.text.DigitList</include>
</additional-boot-jar-classes>
<!--We declare the field 'service.ProductCatalog.catalog' a root, making it
available for all instances of our app that runs via DSO-->
<roots>
<root>
<field-name>service.ProductCatalog.catalog</field-name>
<root-name>ProductCatalog</root-name>
</root>
</roots>
</dso>
</application>
</tc:tc-config>