Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame^] | 1 | <html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat Configuration Reference (6.0.39) - The ClusterManager object</title><meta name="author" content="Filip Hanik"><style type="text/css" media="print">
|
| 2 | .noPrint {display: none;}
|
| 3 | td#mainBody {width: 100%;}
|
| 4 | </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="right" alt="
|
| 5 | The Apache Tomcat Servlet/JSP Container
|
| 6 | " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1><font face="arial,helvetica,sanserif">Version 6.0.39, Jan 27 2014</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="nowrap" class="noPrint"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li><li><a href="index.html">Config Ref. Home</a></li></ul><p><strong>Top Level Elements</strong></p><ul><li><a href="server.html">Server</a></li><li><a href="service.html">Service</a></li></ul><p><strong>Executors</strong></p><ul><li><a href="executor.html">Executor</a></li></ul><p><strong>Connectors</strong></p><ul><li><a href="http.html">HTTP</a></li><li><a href="ajp.html">AJP</a></li></ul><p><strong>Containers</strong></p><ul><li><a href="context.html">Context</a></li><li><a href="engine.html">Engine</a></li><li><a href="host.html">Host</a></li><li><a href="cluster.html">Cluster</a></li></ul><p><strong>Nested Components</strong></p><ul><li><a href="globalresources.html">Global Resources</a></li><li><a href="listeners.html">Listeners</a></li><li><a href="loader.html">Loader</a></li><li><a href="manager.html">Manager</a></li><li><a href="realm.html">Realm</a></li><li><a href="resources.html">Resources</a></li><li><a href="valve.html">Valve</a></li></ul><p><strong>Cluster Elements</strong></p><ul><li><a href="cluster.html">Cluster</a></li><li><a href="cluster-manager.html">Manager</a></li><li><a href="cluster-channel.html">Channel</a></li><li><a href="cluster-membership.html">Channel/Membership</a></li><li><a href="cluster-sender.html">Channel/Sender</a></li><li><a href="cluster-receiver.html">Channel/Receiver</a></li><li><a href="cluster-interceptor.html">Channel/Interceptor</a></li><li><a href="cluster-valve.html">Valve</a></li><li><a href="cluster-deployer.html">Deployer</a></li><li><a href="cluster-listener.html">ClusterListener</a></li></ul><p><strong>Other</strong></p><ul><li><a href="filter.html">Filter</a></li><li><a href="systemprops.html">System properties</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Apache Tomcat Configuration Reference</h1><h2>The ClusterManager object</h2><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
|
| 7 | <ul><li><a href="#Introduction">Introduction</a></li><li><a href="#The_<Manager>">The <Manager></a></li><li><a href="#Attributes">Attributes</a><ol><li><a href="#Common_Attributes">Common Attributes</a></li><li><a href="#org.apache.catalina.ha.session.DeltaManager_Attributes">org.apache.catalina.ha.session.DeltaManager Attributes</a></li><li><a href="#org.apache.catalina.ha.session.BackupManager_Attributes">org.apache.catalina.ha.session.BackupManager Attributes</a></li></ol></li></ul>
|
| 8 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
|
| 9 | <p>A cluster manager is an extension to Tomcat's session manager interface,
|
| 10 | <code>org.apache.catalina.Manager</code>.
|
| 11 | A cluster manager must implement the
|
| 12 | <code>org.apache.catalina.ha.ClusterManager</code> and is solely responsible
|
| 13 | for how the session is replicated.<br>
|
| 14 | There are currently two different managers, the
|
| 15 | <code>org.apache.catalina.ha.session.DeltaManager</code> replicates deltas of
|
| 16 | session data to all members in the cluster. This implementation is proven and
|
| 17 | works very well, but has a limitation as it requires the cluster members to be
|
| 18 | homogeneous, all nodes must deploy the same applications and be exact
|
| 19 | replicas. The <code>org.apache.catalina.ha.session.BackupManager</code> also
|
| 20 | replicates deltas but only to one backup node. The location of the backup node
|
| 21 | is known to all nodes in the cluster. It also supports heterogeneous
|
| 22 | deployments, so the manager knows at what locations the web application is
|
| 23 | deployed.</p>
|
| 24 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="The <Manager>"><!--()--></a><a name="The_<Manager>"><strong>The <Manager></strong></a></font></td></tr><tr><td><blockquote>
|
| 25 | <p>The <code><Manager></code> element defined inside the
|
| 26 | <code><Cluster></code> element is the template defined for all web
|
| 27 | applications that are marked <code><distributable/></code> in their
|
| 28 | <code>web.xml</code> file. However, you can still override the manager
|
| 29 | implementation on a per web application basis, by putting the
|
| 30 | <code><Manager></code> inside the <code><Context></code> element
|
| 31 | either in the <code><a href="context.html">context.xml</a></code> file or the
|
| 32 | <code><a href="index.html">server.xml</a></code> file.</p>
|
| 33 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Attributes"><strong>Attributes</strong></a></font></td></tr><tr><td><blockquote>
|
| 34 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Common Attributes"><!--()--></a><a name="Common_Attributes"><strong>Common Attributes</strong></a></font></td></tr><tr><td><blockquote>
|
| 35 | <table border="1" cellpadding="5"><tr><th width="15%" bgcolor="#023264"><font color="#ffffff">Attribute</font></th><th width="85%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><strong><code>className</code></strong></td><td align="left" valign="center">
|
| 36 | </td></tr><tr><td align="left" valign="center"><code>name</code></td><td align="left" valign="center">
|
| 37 | <b>The name of this cluster manager, the name is used to identify a
|
| 38 | session manager on a node. The name might get modified by the
|
| 39 | <code>Cluster</code> element to make it unique in the container.</b>
|
| 40 | </td></tr><tr><td align="left" valign="center"><code>defaultMode</code></td><td align="left" valign="center">
|
| 41 | <b>Deprecated since 6.0.0</b>
|
| 42 | </td></tr><tr><td align="left" valign="center"><code>notifyListenersOnReplication</code></td><td align="left" valign="center">
|
| 43 | Set to <code>true</code> if you wish to have session listeners notified
|
| 44 | when session attributes are being replicated or removed across Tomcat
|
| 45 | nodes in the cluster.
|
| 46 | </td></tr><tr><td align="left" valign="center"><code>expireSessionsOnShutdown</code></td><td align="left" valign="center">
|
| 47 | When a web application is being shutdown, Tomcat issues an expire call
|
| 48 | to each session to notify all the listeners. If you wish for all
|
| 49 | sessions to expire on all nodes when a shutdown occurs on one node, set
|
| 50 | this value to <code>true</code>. Default value is <code>false</code>.
|
| 51 | </td></tr></table>
|
| 52 | </blockquote></td></tr></table>
|
| 53 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="org.apache.catalina.ha.session.DeltaManager Attributes"><!--()--></a><a name="org.apache.catalina.ha.session.DeltaManager_Attributes"><strong>org.apache.catalina.ha.session.DeltaManager Attributes</strong></a></font></td></tr><tr><td><blockquote>
|
| 54 | <table border="1" cellpadding="5"><tr><th width="15%" bgcolor="#023264"><font color="#ffffff">Attribute</font></th><th width="85%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><code>domainReplication</code></td><td align="left" valign="center">
|
| 55 | <b>Deprecated since 6.0.0</b><br>
|
| 56 | If you wish sessions to be replicated only to members that have the
|
| 57 | same logical domain set, use
|
| 58 | <code><a href="cluster-interceptor.html">DomainFilterInterceptor </a></code>.
|
| 59 | </td></tr><tr><td align="left" valign="center"><code>expireSessionsOnShutdown</code></td><td align="left" valign="center">
|
| 60 | When a web application is being shutdown, Tomcat issues an expire call
|
| 61 | to each session to notify all the listeners. If you wish for all
|
| 62 | sessions to expire on all nodes when a shutdown occurs on one node, set
|
| 63 | this value to <code>true</code>.
|
| 64 | Default value is <code>false</code>.
|
| 65 | </td></tr><tr><td align="left" valign="center"><code>maxActiveSessions</code></td><td align="left" valign="center">
|
| 66 | The maximum number of active sessions that will be created by this
|
| 67 | Manager, or -1 (the default) for no limit. For this manager, all
|
| 68 | sessions are counted as active sessions irrespective if whether or not
|
| 69 | the current node is the primary node for the session.
|
| 70 | </td></tr><tr><td align="left" valign="center"><code>notifySessionListenersOnReplication</code></td><td align="left" valign="center">
|
| 71 | Set to <code>true</code> if you wish to have session listeners notified
|
| 72 | when sessions are created and expired across Tomcat nodes in the
|
| 73 | cluster.
|
| 74 | </td></tr><tr><td align="left" valign="center"><code>notifyContainerListenersOnReplication</code></td><td align="left" valign="center">
|
| 75 | Set to <code>true</code> if you wish to have container listeners notified
|
| 76 | across Tomcat nodes in the cluster.
|
| 77 | </td></tr><tr><td align="left" valign="center"><code>stateTransferTimeout</code></td><td align="left" valign="center">
|
| 78 | The time in seconds to wait for a session state transfer to complete
|
| 79 | from another node when a node is starting up.
|
| 80 | Default value is <code>60</code> seconds.
|
| 81 | </td></tr><tr><td align="left" valign="center"><code>sessionAttributeFilter</code></td><td align="left" valign="center">
|
| 82 | A regular expression used to filter, which session attributes will
|
| 83 | be replicated. An attribute will only be replicated, if its name
|
| 84 | matches this pattern. If the pattern is not set (default), all
|
| 85 | attributes are eligible for replication. As an example, the value
|
| 86 | <code>^(userName|sessionHistory)$</code> will only replicate the two
|
| 87 | session attributes named <code>userName</code> and
|
| 88 | <code>sessionHistory</code>.
|
| 89 | </td></tr></table>
|
| 90 | </blockquote></td></tr></table>
|
| 91 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="org.apache.catalina.ha.session.BackupManager Attributes"><!--()--></a><a name="org.apache.catalina.ha.session.BackupManager_Attributes"><strong>org.apache.catalina.ha.session.BackupManager Attributes</strong></a></font></td></tr><tr><td><blockquote>
|
| 92 | <table border="1" cellpadding="5"><tr><th width="15%" bgcolor="#023264"><font color="#ffffff">Attribute</font></th><th width="85%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><code>mapSendOptions</code></td><td align="left" valign="center">
|
| 93 | The backup manager uses a replicated map, this map is sending and
|
| 94 | receiving messages. You can setup the flag for how this map is sending
|
| 95 | messages, the default value is <code>6</code>(synchronous).<br>
|
| 96 | Note that if you use asynchronous messaging it is possible for update
|
| 97 | messages for a session to be processed by the receiving node in a
|
| 98 | different order to the order in which they were sent.
|
| 99 | </td></tr><tr><td align="left" valign="center"><code>maxActiveSessions</code></td><td align="left" valign="center">
|
| 100 | The maximum number of active sessions that will be created by this
|
| 101 | Manager, or -1 (the default) for no limit. For this manager, only
|
| 102 | sessions where the current node is the primary node for the session are
|
| 103 | considered active sessions.
|
| 104 | </td></tr><tr><td align="left" valign="center"><code>rpcTimeout</code></td><td align="left" valign="center">
|
| 105 | Timeout for RPC message used for broadcast and transfer state from
|
| 106 | another map.
|
| 107 | Default value is <code>15000</code> milliseconds.
|
| 108 | </td></tr></table>
|
| 109 | </blockquote></td></tr></table>
|
| 110 | </blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
|
| 111 | Copyright © 1999-2014, Apache Software Foundation
|
| 112 | </em></font></div></td></tr></table></body></html> |