Tomcat Cluster

From Documentation
Revision as of 07:39, 24 June 2013 by Vincent (talk | contribs) (Created page with "{{ZKInstallationGuidePageHeader}} = Setup Tomcat Cluster environment = *Refer to [http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html Tomcat Document] to set up cluster e...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Setup Tomcat Cluster environment

Using more than 3 nodes with ZK

  • Using DeltaManager instead of BackupManager, refer to cluster-manager for more information.

Additional setting in ZK project

You have to configure the following settings to make ZK project work in tomcat cluster environment.

web.xml

  • Add the distributable element in WEB-INF/web.xml.
<?xml version="1.0"?>
<web-app  xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">

    <distributable/>

</web-app>

zk.xml

  • Turn on Serializable UI Factory for ZK, please refer to this documentation.
  • If Tomcat cluster nodes is large than 3, also need to add cluster session patch.

For example,

<zk>
    <system-config>
        <ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class>
    </system-config>
    <!-- clustering environment, since ZK 5.0.8-->
    <listener>
        <listener-class>org.zkoss.zkplus.cluster.ClusterSessionPatch</listener-class>
    </listener>
</zk>

Version History

Last Update : 2013/06/24



Last Update : 2013/06/24

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.