Configuring Availability at the Web Container Level

To enable availability or override availability settings for an individual web application, use settings in the sun-web.xml file. For details, see the Developer’s Guide.

To enable or disable web container availability using the Administration Console:

  1. Select the Web Container Availability tab, then check the Availability Service box. To disable it, uncheck the box. You can also change these optional settings:
  2. You can set a web container availability property by clicking on Add Property at the bottom of the Web Container Availability page. The properties you can set are listed in the following table.
  3. Table 0-24  Web Container Availability Properties 

    Property

    Default

    Description

    reapIntervalSeconds

    60

    Specifies the number of seconds between checks for expired sessions. Sessions are passivated if maxSessions has been exceeded.

    If the Persistence Frequency is set to time-based, active sessions are stored at this interval.

    You should set this value lower than the frequency at which session data changes to prevent data inconsistency. For example, this value should be as low as possible (1 second) for a hit counter servlet on a frequently accessed website, or you could lose the last few hits each time you restart the server.

    Applicable only if the Persistence Type is file or ha.

    maxSessions

    -1

    Specifies the maximum number of sessions that can be in cache, or -1 for no limit. After this, an attempt to create a new session causes an IllegalStateException to be thrown.

    The session manager passivates sessions to the persistent store when this maximum is reached.

    Applicable only if the Persistence Type is file or ha.

    sessionFilename

    none; state is not preserved across restarts

    Specifies the absolute or relative path to the directory in which the session state is preserved between application restarts, if preserving the state is possible. A relative path is relative to the temporary directory for this web application.

    Applicable only if the Persistence Type is memory.

    directory

    domain_dir/generated/jsp/j2ee-apps/appname/appname_war

    Specifies the absolute or relative pathname of the directory into which individual session files are written. A relative path is relative to the temporary work directory for this web application.

    Applicable only if the Persistence Type is file.

    timeoutSeconds

    600

    Specifies the default maximum inactive interval (in seconds) for all sessions created in a web module. If set to 0 or less, sessions in a web module never expire.

    If a session-timeout element is specified in the web.xml file, the session-timeout value overrides any timeoutSeconds value. If neither session-timeout nor timeoutSeconds is specified, the timeoutSeconds default is used.

    Note that the session-timeout element in web.xml is specified in minutes, not seconds.

    Applicable only if the Persistence Type is file or ha.

  4. Click on the Save button.
  5. Expand the Instances node.
  6. Select the server instance.
  7. Go to the server instance page.
  8. Restart the server.

Legal Notices