Sun GlassFish Enterprise Server v2.1.1 High Availability Administration Guide

Configuring Availability for Individual Web Applications

To enable and configure availability for an individual web application, edit the application deployment descriptor file, sun-web.xml. The settings in an application’s deployment descriptor override the web container’s availability settings.

The session-manager element’s persistence-type attribute determines the type of session persistence an application uses. It must be set to ha or replicated to enable high availability session persistence.

For more information about the sun-web.xml file, see The sun-web.xml File in Sun GlassFish Enterprise Server v2.1.1 Application Deployment Guide.

Example

<sun-web-app> ... 
  <session-config> 
    <session-manager persistence-type="replicated"> 
      <manager-properties> 
        <property name="persistenceFrequency" value="web-method" /> 
      </manager-properties> 
      <store-properties> 
        <property name="persistenceScope" value="session" /> 
      </store-properties> 
    </session-manager> ... 
</session-config> ...