Thanks for replying;
1-) I've configured the debugging named loader, and note that there is two class loaders ==> System.standard and System.ext,
so both of them or one of them(which one) ?
2-) I've red the doc you sent by the link. If i have a same field in the two applications i described, which i want to share, i have to put in the tc-config.xml two <root> stanzas with one common <root-name> stanzas; is that right ?
Anyway here is my new tc-config.xml, and i want to share the buffer field and loopCounter field between HelloClusteredWorld.java and WebApplication1:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--
All content copyright (c) 2003-2007 Terracotta, Inc.,
except as may otherwise be noted in a separate copyright notice.
All rights reserved.
-->
<!--
This is a Terracotta configuration file that has been pre-configured
for use with DSO. All classes are included for instrumentation,
and all instrumented methods are write locked.
For more information, please see the product documentation.
-->
<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-4.xsd">
<servers>
<!-- Tell DSO where the Terracotta server can be found. -->
<server host="localhost">
<data>%(user.home)/terracottaWeb/server-data</data>
<logs>%(user.home)/terracottaWeb/server-logs</logs>
<dso>
<persistence>
<mode>permanent-store</mode>
</persistence>
</dso>
</server>
</servers>
<!-- Tell DSO where to put the generated client logs -->
<clients>
<logs>%(user.home)/terracottaWeb/client-logs</logs>
</clients>
<application>
<dso>
<roots>
<root>
<field-name>HelloClusteredWorld.buffer</field-name>
<root-name>MonBuffer</root-name>
</root>
<root>
<field-name>webapplication1.Page1.buffer</field-name>
<root-name>MonBuffer</root-name>
</root>
<root>
<field-name>HelloClusteredWorld.loopCounter</field-name>
<root-name>MonLoopCounter</root-name>
</root>
<root>
<field-name>webapplication1.Page1.loopCounter</field-name>
<root-name>MonLoopCounter</root-name>
</root>
</roots>
<!-- Start by including all classes for instrumentation.
It's more efficient to instrument only those classes that
hold shared roots or are part of a shared root's graph.
-->
<instrumented-classes>
<include>
<class-expression>webapplication1.Page1</class-expression>
</include>
<include>
<class-expression>HelloClusteredWorld</class-expression>
</include>
</instrumented-classes>
<!-- Apply write level autolocks for all instrumented methods.
It's more efficient to create finer-grain locks as dictated
by your application needs.
-->
<locks>
<autolock>
<lock-level>write</lock-level>
<method-expression>String webapplication1.Page1.button1_action(..)</method-expression>
</autolock>
<autolock>
<lock-level>write</lock-level>
<method-expression>void HelloClusteredWorld.main(..)</method-expression>
</autolock>
</locks>
<app-groups>
<app-group name="webAndPojo">
<web-application>WebApplication1</web-application>
<named-classloader>System.standard</named-classloader> -->
</app-group>
</app-groups>
</dso>
</application>
</tc:tc-config>
Thanks a lot for help