Configures the web container.
The following table describes subelements for the web-container element.
Table 1–160 web-container Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies session configuration information for the web container. |
|
zero or more |
Specifies a property or a variable. |
Enables availability in the web container, including HTTP session persistence to the high-availability database (HADB).
If availability is disabled, there is no high availability for HTTP session persistence. In other words, persistence-type=memory.
If availability is enabled but no other web-container-availability attributes are specified, the default session persistence configuration is as follows:
persistence-type=ha persistence-frequency=time-based persistence-scope=session
The default configuration for all applications can be changed by setting the various web-container-availability attributes and properties.
You can override the various web-container-availability attributes and properties for a specific application in sun-web.xml. For details, see the Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer’s Guide.
The following table describes subelements for the web-container-availability element.
Table 1–161 web-container-availability Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the web-container-availability element.
Table 1–162 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 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. |
|
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.1 2005Q2 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.
Specifies a deployed web module.
The following table describes subelements for the web-module element.
Table 1–163 web-module Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Contains a text description of this element. |
The following table describes attributes for the web-module element.
Table 1–164 web-module Attributes
Attribute |
Default |
Description |
---|---|---|
none |
The name of the web module. |
|
none |
The context root at which the web module is deployed. The context root can be the empty string or just /. The context root can start with the / character, but doesn’t have to. For load balancing to work, web module context roots must be unique within a cluster. See the Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide for more information about load balancing. |
|
none |
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/ |
|
user |
(optional) Defines the type of the resource. Allowed values are:
|
|
enabled |
true |
(optional) Determines whether the web module is 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. |
|
false |
(optional) Specifies whether the application has been deployed to a directory. |