Under most circumstances, you should only be adding classes for your
application. If you are adding classes for frameworks or code not written by
you, then you should consider finding a Terracotta Integration Module (TIM)
that matches the framework you are using.
As an example, if the non-portable class listed below is
net.sf.ehcache.CacheManager, you should consider using the ehcache TIM.
It is possible that some or all of the super classes above are truly
non-portable, the solution is then to mark the referring field(s) as
transient.
Action to take:
1) Reconfigure to include the unshareable super-class(es)
* edit your tc-config.xml file
* locate the <dso> element
* add this snippet inside the <dso> element
<instrumented-classes>
<include>
<class-expression>org.terracotta.collections.ConcurrentDistributedMap</class-expression>
</include>
</instrumented-classes>
* if there is already an <instrumented-classes> element present, simply add
the new includes inside it
set TOMCAT_HOME=D:\apache-tomcat-6.0.20
set TC_INSTALL_DIR=D:\terracotta\terracotta-3.1.1
set TC_CONFIG_PATH=D:\terracotta\terracotta-3.1.1\tc-config.xml
call %TC_INSTALL_DIR%\bin\dso-env.bat -q
set JAVA_OPTS=%JAVA_OPTS% %TC_JAVA_OPTS%
startup.bat
另外在catalina.bat的第一行增加了:
Code:
set JAVA_OPTS=-javaagent:\terracotta\terracotta-3.1.1\hibernate\terracotta-hibernate-agent-1.0.1.jar -cp D:\terracotta\terracotta-3.1.1\hibernate\terracotta-hibernate-cache-1.0.1.jar