The following table describes attributes for the web-container-availability element.
Table 1–163 web-container-availability Attributes
Attribute |
Default |
Description |
---|---|---|
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. |
|
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 session-file-name attribute 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 attribute 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. |
|
web-method |
(optional) Specifies how often the session state is stored. Applicable only if the persistence-type is ha. Allowed values are as follows:
|
|
session |
(optional) Specifies how much of the session state is stored. Applicable only if the persistence-type is ha. Allowed values are as follows:
|
|
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. |
|
availability-service store-pool-name attribute value |
(optional) Specifies the jndi-name of the jdbc-resource used for connections to the HADB for session persistence. For more information about setting up a connection pool and JDBC resource for the HADB, see the description of the configure-ha-cluster command in the Sun Java System Application Server Enterprise Edition 8.2 Reference Manual. |
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.