Attributes

The following table describes attributes for the web-container-availability element.

Table 1–162 web-container-availability
Attributes

Attribute

Default

Description

availability-enabled

true

(optional) If set to true, and if availability is
enabled for the server instance (see availability-service), high-availability features apply to all web applications deployed
to the server instance that do not have availability disabled. All instances
in a cluster should have the same availability value to ensure consistent
behavior.

persistence-type

memory

(optional) Specifies the session persistence mechanism for web applications
that have availability enabled. Allowed values are memory (no
persistence) file (the file system) and ha (the
HADB). For production environments that require session persistence, use ha.

If set to memory, the manager-properties element’s sessionFilename property specifies
the file system location where the HTTP session state is stored if the server
instance is gracefully shut down. This is useful for internal testing but
is not supported for production environments.

If set to file, the store-properties element’s directory property specifies the
file system location where the HTTP session state is stored. Persisting to
the file system is useful for internal testing but is not supported for production
environments.

persistence-frequency

web-method

(optional) Specifies how often the session state is stored. Applicable
only if the persistence-type is ha.
Allowed values are as follows:

web-method - The session state is stored
at the end of each web request prior to sending a response back to the client.
This mode provides the best guarantee that the session state is fully updated
in case of failure.

time-based - The session state is stored
in the background at the frequency set by the reapIntervalSeconds property.
This mode provides less of a guarantee that the session state is fully updated.
However, it can provide a significant performance improvement because the
state is not stored after each request.

persistence-scope

session

(optional) Specifies how much of the session state is stored. Applicable
only if the persistence-type is ha.
Allowed values are as follows:

session - The entire session state is stored
every time. This mode provides the best guarantee that your session data is
correctly stored for any distributable web application.

modified-session - The entire session state
is stored if it has been modified. A session is considered to have been modified
if HttpSession.setAttribute() or HttpSession.removeAttribute() was called.
You must guarantee that setAttribute() is called every
time an attribute is changed. This is not a J2EE specification requirement,
but it is required for this mode to work properly.

modified-attribute - Only modified session
attributes are stored. For this mode to work properly, you must follow some
guidelines, which are explained immediately following this table.

sso-failover-enabled

false

(optional) If true, the single sign-on state is highly
available. To enable single sign-on, use the sso-enabled property
of the virtual-server element.

If the persistence-scope attribute is set to modified-attribute , your web application must follow these guidelines:

Call setAttribute() every time the session
state is modified.

Make sure there are no cross-references between attributes.
The object graph under each distinct attribute key is serialized and stored
separately. If there are any object cross references between the objects under
each separate key, they are not serialized and deserialized correctly.

Distribute the session state across multiple attributes, or
at least between a read-only attribute and a modifiable attribute.

A fully qualified or relative path to the directory to which the contents
of the .war file have been extracted. If relative, it is
relative to the following directory:

domain-dir/applications/j2ee-modules/

object-type

user

(optional) Defines the type of the resource. Allowed values are:

system-all - A system resource for all
server instances and the domain application server.

system-admin - A system resource only for
the domain application server.

system-instance - A system resource for
all server instances only.

user - A user resource.

enabled

true

(optional) Determines whether the web module is enabled.

availability-enabled

false

(optional) Specifies whether availability is enabled in this web application
for HTTP session persistence (and potentially passivation). Availability must
also be enabled for the application or stand-alone web module during deployment.
For more information about availability, see availability-service.

directory-deployed

false

(optional) Specifies whether the application has been deployed to a
directory.