Sun Java System Web Server 7.0 Update 7 Administrator's Guide

Configuring a Web Application for Session Replication

To enable the server to replicate the session, the web application must also be enabled for session replication.

  1. To enable session replication for a web application, modify the sun-web.xml configuration file located in the <web-application>/WEB-INF directory.

    The modification needed in the sunweb.xml is as follows:

    Change the element <session-manager/> to <session-manager persistence-type="replicated">

    The sample sun-web.xml file with session replication enabled is given below:

    <sun-web-app>
    		<session-config>
         <session-manager persistence-type="replicated">
         </session-manager>
      </session-config>
    </sun-web-app>
  2. After modifying the sunweb.xml file, either rebuild the web application or re-jar the application to create a web application archive (a war file).

  3. Restart all the instances to make the web application available on all the instances.

  4. The web application is accessible from all the nodes in the cluster. To access the web application, in a browser, type the following:

    http://webserver-name/webapplication-name/


    Note –

    A directory that is accessible to all nodes is the best way to store the applications for deployment. This directory, however, need not be accessible to the Administration Server. It is recommended to make directory-based deployments of web applications that are more than 1 MB in size.

    To create search collections, ensure that the search collection resides in a common directory that is accessible to all the nodes.