• 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • The ClusterManager object

    Table of Contents

    Introduction

    七乐彩开奖结果 www.eleieg.com A cluster manager is an extension to Tomcat's session manager interface, org.apache.catalina.Manager. A cluster manager must implement the org.apache.catalina.ha.ClusterManager and is solely responsible for how the session is replicated.
    There are currently two different managers, the org.apache.catalina.ha.session.DeltaManager replicates deltas of session data to all members in the cluster. This implementation is proven and works very well, but has a limitation as it requires the cluster members to be homogeneous, all nodes must deploy the same applications and be exact replicas. The org.apache.catalina.ha.session.BackupManager also replicates deltas but only to one backup node. The location of the backup node is known to all nodes in the cluster. It also supports heterogeneous deployments, so the manager knows at what locations the web application is deployed.

    The <Manager>

    The <Manager> element defined inside the <Cluster> element is the template defined for all web applications that are marked <distributable/> in their web.xml file. However, you can still override the manager implementation on a per web application basis, by putting the <Manager> inside the <Context> element either in the context.xml file or the server.xml file.

    Attributes

    Common Attributes

    Attribute Description
    className
    name The name of this cluster manager, the name is used to identify a session manager on a node. The name might get modified by the Cluster element to make it unique in the container.
    notifyListenersOnReplication Set to true if you wish to have session listeners notified when session attributes are being replicated or removed across Tomcat nodes in the cluster.
    processExpiresFrequency

    Frequency of the session expiration, and related manager operations. Manager operations will be done once for the specified amount of backgroundProcess calls (i.e., the lower the amount, the more often the checks will occur). The minimum value is 1, and the default value is 6.

    secureRandomClass

    Name of the Java class that extends java.security.SecureRandom to use to generate session IDs. If not specified, the default value is java.security.SecureRandom.

    secureRandomProvider

    Name of the provider to use to create the java.security.SecureRandom instances that generate session IDs. If an invalid algorithm and/or provider is specified, the Manager will use the platform default provider and the default algorithm. If not specified, the platform default provider will be used.

    secureRandomAlgorithm

    Name of the algorithm to use to create the java.security.SecureRandom instances that generate session IDs. If an invalid algorithm and/or provider is specified, the Manager will use the platform default provider and the default algorithm. If not specified, the default algorithm of SHA1PRNG will be used. If the default algorithm is not supported, the platform default will be used. To specify that the platform default should be used, do not set the secureRandomProvider attribute and set this attribute to the empty string.

    recordAllActions

    Flag whether send all actions for session across Tomcat cluster nodes. If set to false, if already done something to the same attribute, make sure don't send multiple actions across Tomcat cluster nodes. In that case, sends only the actions that have been added at last. Default is false.

    org.apache.catalina.ha.session.DeltaManager Attributes

    Attribute Description
    expireSessionsOnShutdown When a web application is being shutdown, Tomcat issues an expire call to each session to notify all the listeners. If you wish for all sessions to expire on all nodes when a shutdown occurs on one node, set this value to true. Default value is false.
    maxActiveSessions The maximum number of active sessions that will be created by this Manager, or -1 (the default) for no limit. For this manager, all sessions are counted as active sessions irrespective if whether or not the current node is the primary node for the session.
    notifySessionListenersOnReplication Set to true if you wish to have session listeners notified when sessions are created and expired across Tomcat nodes in the cluster.
    notifyContainerListenersOnReplication Set to true if you wish to have container listeners notified across Tomcat nodes in the cluster.
    stateTransferTimeout The time in seconds to wait for a session state transfer to complete from another node when a node is starting up. Default value is 60 seconds.
    sendAllSessions Flag whether send sessions as split blocks. If set to true, send all sessions as one big block. If set to false, send sessions as split blocks. Default value is true.
    sendAllSessionsSize The number of sessions in a session block message. This value is effective only when sendAllSessions is false. Default is 1000.
    sendAllSessionsWaitTime Wait time between sending of session block messages. This value is effective only when sendAllSessions is false. Default is 2000 milliseconds.
    sessionAttributeNameFilter

    A regular expression used to filter which session attributes will be replicated. An attribute will only be replicated if its name matches this pattern. If the pattern is zero length or null, all attributes are eligible for replication. The pattern is anchored so the session attribute name must fully match the pattern. As an example, the value (userName|sessionHistory) will only replicate the two session attributes named userName and sessionHistory. If not specified, the default value of null will be used.

    sessionAttributeValueClassNameFilter

    A regular expression used to filter which session attributes will be replicated. An attribute will only be replicated if the implementation class name of the value matches this pattern. If the pattern is zero length or null, all attributes are eligible for replication. The pattern is anchored so the fully qualified class name must fully match the pattern. If not specified, the default value of null will be used unless a SecurityManager is enabled in which case the default will be java\\.lang\\.(?:Boolean|Integer|Long|Number|String).

    stateTimestampDrop When this node sends a GET_ALL_SESSIONS message to other node, all session messages that are received as a response are queued. If this attribute is set to true, the received session messages (except any GET_ALL_SESSIONS sent by other nodes) are filtered by their timestamp. A message is dropped if it is not a GET_ALL_SESSIONS message and its timestamp is earlier than the timestamp of our GET_ALL_SESSIONS message. If set to false, all queued session messages are handled. Default is true.
    warnOnSessionAttributeFilterFailure

    If sessionAttributeNameFilter or sessionAttributeValueClassNameFilter blocks an attribute, should this be logged at WARN level? If WARN level logging is disabled then it will be logged at DEBUG. The default value of this attribute is false unless a SecurityManager is enabled in which case the default will be true.

    org.apache.catalina.ha.session.BackupManager Attributes

    Attribute Description
    mapSendOptions The backup manager uses a replicated map, this map is sending and receiving messages. You can setup the flag for how this map is sending messages, the default value is 6(synchronous).
    Note that if you use asynchronous messaging it is possible for update messages for a session to be processed by the receiving node in a different order to the order in which they were sent.
    maxActiveSessions The maximum number of active sessions that will be created by this Manager, or -1 (the default) for no limit. For this manager, only sessions where the current node is the primary node for the session are considered active sessions.
    rpcTimeout Timeout for RPC message used for broadcast and transfer state from another map. Default value is 15000 milliseconds.
    sessionAttributeNameFilter

    A regular expression used to filter which session attributes will be replicated. An attribute will only be replicated if its name matches this pattern. If the pattern is zero length or null, all attributes are eligible for replication. The pattern is anchored so the session attribute name must fully match the pattern. As an example, the value (userName|sessionHistory) will only replicate the two session attributes named userName and sessionHistory. If not specified, the default value of null will be used.

    sessionAttributeValueClassNameFilter

    A regular expression used to filter which session attributes will be replicated. An attribute will only be replicated if the implementation class name of the value matches this pattern. If the pattern is zero length or null, all attributes are eligible for replication. The pattern is anchored so the fully qualified class name must fully match the pattern. If not specified, the default value of null will be used unless a SecurityManager is enabled in which case the default will be java\\.lang\\.(?:Boolean|Integer|Long|Number|String).

    terminateOnStartFailure Set to true if you wish to terminate replication map when replication map fails to start. If replication map is terminated, associated context will fail to start. If you set this attribute to false, replication map does not end. It will try to join the map membership in the heartbeat. Default value is false .
    warnOnSessionAttributeFilterFailure

    If sessionAttributeNameFilter or sessionAttributeValueClassNameFilter blocks an attribute, should this be logged at WARN level? If WARN level logging is disabled then it will be logged at DEBUG. The default value of this attribute is false unless a SecurityManager is enabled in which case the default will be true.

    accessTimeout The timeout for a ping message. If a remote map does not respond within this timeout period, its regarded as disappeared. Default value is 5000 milliseconds.

    Nested Components

    All Manager Implementations

    All Manager implementations allow nesting of a <SessionIdGenerator> element. It defines the behavior of session id generation. All implementations of the SessionIdGenerator allow the following attributes:

    Attribute Description
    sessionIdLength

    The length of the session ID may be changed with the sessionIdLength attribute.

    Comments

    Notice: This comments section collects your suggestions on improving documentation for Apache Tomcat.

    If you have trouble and need help, read Find Help page and ask your question on the tomcat-users 七乐彩开奖结果. Do not ask such questions here. This is not a Q&A section.

    The Apache Comments System is explained here. Comments may be removed by our moderators if they are either implemented or considered invalid/off-topic.

  • 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • 上海基诺玩法 黑龙江快乐十分规则 玩北京pk10输了很多钱 4场进球彩玩法共需要竞猜多少项 马会特码资料 卡红是什么意思 幸运飞艇冠军全天计划软件 浙江31选7走势图300期 吉林十一选五开奘结果 九关虎豹二肖中特 腾讯分分彩组60漏洞 安徽快三投注时时彩 安徽25选5走势图 双色球19087期蓝球预测 甘肃11选五基本走势图