Author: manik.surtani(a)jboss.com
Date: 2008-01-10 10:56:22 -0500 (Thu, 10 Jan 2008)
New Revision: 5115
Modified:
core/trunk/src/main/docbook/userguide/en/modules/cache_loaders.xml
core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml
Log:
Documented TCP Cacheloader shutdown hook and marshalled value config elements
Modified: core/trunk/src/main/docbook/userguide/en/modules/cache_loaders.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/cache_loaders.xml 2008-01-10 15:55:35
UTC (rev 5114)
+++ core/trunk/src/main/docbook/userguide/en/modules/cache_loaders.xml 2008-01-10 15:56:22
UTC (rev 5115)
@@ -35,7 +35,6 @@
</mediaobject>
</figure>
-
<para>The interaction between JBoss Cache and a
<literal>CacheLoader</literal>
implementation is as follows. When
@@ -931,11 +930,19 @@
dependency injection).
</para>
- <para>The TcpDelegatingCacheLoader is configured with the host and
- port of the remote TcpCacheServer, and uses this to communicate to
- it.
+ <para>
+ As of JBoss Cache 2.1.0, the TcpDelegatingCacheLoader transparently handles
reconnects if the connection
+ to the TcpCacheServer is lost.
</para>
+ <para>The TcpDelegatingCacheLoader is configured with the host and port of
the remote TcpCacheServer, and uses this to communicate to
+ it. In addition, 2 new optional parameters are used to control transparent
reconnecting to the TcpCacheServer.
+ The <literal>timeout</literal> property (defaults to 5000)
specifies the length of time the cache loader must continue
+ retrying to connect to the TcpCacheServer before giving up and throwing an
exception. The <literal>reconnectWaitTime</literal>
+ (defaults to 500) is how long the cache loader should wait before attempting
a reconnect if it detects a communication failure.
+ The last two parameters can be used to add a level of fault tolerance to the
cache loader, do deal with TcpCacheServer restarts.
+ </para>
+
<para>The configuration looks as follows:</para>
<programlisting>
@@ -947,6 +954,8 @@
<properties>
host=myRemoteServer
port=7500
+ timeout=10000
+ reconnectWaitTime=250
</properties>
</cacheloader>
</config>
Modified: core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml
===================================================================
---
core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml 2008-01-10
15:55:35 UTC (rev 5114)
+++
core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml 2008-01-10
15:56:22 UTC (rev 5115)
@@ -116,7 +116,13 @@
<!-- Max number of milliseconds to wait for a lock acquisition -->
<attribute name="LockAcquisitionTimeout">15000</attribute>
+ <!-- Shutdown hook behavior. Valid choices are: DEFAULT, REGISTER and
DONT_REGISTER.
+ If this element is omitted, DEFAULT is used. -->
+ <attribute name="ShutdownHookBehavior">DEFAULT</attribute>
+ <!-- Enables or disables lazy unmarshalling. If omitted, the default is that
lazy unmarshalling is enabled. -->
+ <attribute name="UseLazyDeserialization">true</attribute>
+
<!-- Specific eviction policy configurations. This is LRU -->
<attribute name="EvictionConfig">
<config>
@@ -656,6 +662,35 @@
</para>
</entry>
</row>
+
+ <row>
+ <entry>
+ <para>ShutdownHookBehavior</para>
+ </entry>
+
+ <entry>
+ <para>An optional parameter that controls whether JBoss Cache
registers a shutdown hook with the JVM
+ runtime. Allowed values are
<literal>DEFAULT</literal>, <literal>REGISTER</literal> and
+ <literal>DONT_REGISTER</literal>.
<literal>REGISTER</literal> and <literal>DONT_REGISTER</literal>
+ forces or suppresses the registration of a shutdown hook,
respectively, and <literal>DEFAULT</literal>
+ registers one if an MBean server (other than the JDK default)
cannot be found and it is assumed that the
+ cache is running in a managed environment. The default if
unspecified is, as expected, <literal>DEFAULT</literal>.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>UseLazyDeserialization</para>
+ </entry>
+
+ <entry>
+ <para>An optional parameter that can be used to enable or
disable the use of lazy deserialization
+ for cached objects. Defaults to
<literal>true</literal>.
+ </para>
+ </entry>
+ </row>
+
</tbody>
</tgroup>
</informaltable>
Show replies by date