Sun GlassFish Enterprise Server v2.1.1 Administration Reference

W

web-container

Configures the web container.

Superelements

config

Subelements

The following table describes subelements for the web-container element.

Table 1–191 web-container Subelements

Element 

Required 

Description 

session-config

zero or one 

Specifies session configuration information for the web container. 

property

zero or more 

Specifies a property or a variable. 

Properties

The following table describes properties for the web-container element.

Table 1–192 web-container Properties

Property 

Default 

Description 

dispatcher-max-depth

20

Prevents recursive include or forward statements from creating an infinite loop by setting a maximum nested dispatch level. If this level is exceeded, the following message is written to the server log:

Exceeded maximum depth for nested request dispatches

web-container-availability

Enables availability in the web container, including HTTP session persistence. If HADB is installed and you have selected the enterprise profile, sessions are persisted to the 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=replicated
persistence-frequency=time-based
persistence-scope=session

If HADB is installed and you have selected the enterprise profile, the default persistence type is ha.

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 GlassFish Enterprise Server v2.1.1 Developer’s Guide.

For additional replicated session persistence properties you can set, see availability-service.

Superelements

availability-service

Subelements

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

Table 1–193 web-container-availability Subelements

Element 

Required 

Description 

property

zero or more 

Specifies a property or a variable. 

Attributes

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

Table 1–194 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 (availability disabled)

replicated (availability enabled)

(optional) Specifies the session persistence mechanism for web applications that have availability enabled. Allowed values are memory (no persistence), file (the file system) and replicated (other servers). If HADB is installed and you have selected the enterprise profile, you can also specify ha. 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.

persistence-frequency

web-method

(optional) Specifies how often the session state is stored. Applicable only if the persistence-type is replicated or 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 manager-properties element’s reap-interval-in-seconds attribute. 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 replicated or 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 Java EE 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.

http-session-store-pool-name

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. Applicable if HADB is installed and you have selected the enterprise profile.

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 GlassFish Enterprise Server v2.1.1 Reference Manual.

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

Properties

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

Table 1–195 web-container-availability Properties

Property 

Default 

Description 

uuid-impl-class

none 

Specifies the name of the class that generates session IDs. If this property is not specified, the Enterprise Server's internal session ID generator is used. 

It is the developer's responsibility to ensure that generated IDs are universally unique even when running on multiple JVMs on multiple machines in a cluster. Failure to ensure this in the algorithm results in nondeterministic behavior and likely corruption of HTTP session data. 

web-module

Specifies a deployed web module.

Superelements

applications

Subelements

The following table describes subelements for the web-module element.

Table 1–196 web-module Subelements

Element 

Required 

Description 

description

zero or one 

Contains a text description of this element. 

web-service-endpoint

zero or more 

Configures a web service endpoint. 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the web-module element.

Table 1–197 web-module Attributes

Attribute 

Default 

Description 

name

none 

The name of the web module. 

context-root

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 GlassFish Enterprise Server v2.1.1 High Availability Administration Guide for more information about load balancing.


Note –

Some topics in the documentation pertain to features that are available only in domains that are configured to support clusters. Examples of domains that support clusters are domains that are created with the cluster profile or the enterprise profile. For information about profiles, see Usage Profiles in Sun GlassFish Enterprise Server v2.1.1 Administration Guide.


location

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/

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. 

libraries

none 

(optional) Specifies an absolute or relative path to libraries specific to this module or application. A relative path is relative to domain-dir/lib/applibs. If the path is absolute, the path must be accessible to the domain administration server (DAS), which means it must be under domain-dir. To include more than one path, use a system-specific separator, such as a colon for Solaris or a semicolon for Windows. The libraries are made available to the application in the order in which they are specified.

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 as a directory. 

web-service-endpoint

Configures a web service endpoint, which can be a JAX-RPC/JAXWS 2.0 or JSR-109 web service.

Superelements

ejb-module, j2ee-application, web-module

Subelements

The following table describes subelements for the web-service-endpoint element.

Table 1–198 web-service-endpoint Subelements

Element 

Required 

Description 

registry-location

zero or more 

Specifies the registry where web service endpoint artifacts are published.  

transformation-rule

zero or more 

Configures an eXtensible Stylesheet Language Transformation (XSLT) rule.

Attributes

The following table describes attributes for the web-service-endpoint element.

Table 1–199 web-service-endpoint Attributes

Attribute 

Default 

Description 

name

none 

The fully qualified name of the web service. For a web service endpoint within an application, the format is as follows: 

module-name#endpoint-name

For example: 

jaxrpc-simple.war#HelloIF

For a web service endpoint that is a stand-alone module, the name is just the endpoint-name.

monitoring

OFF

(optional) Specifies the monitoring level for this web service. For information about monitoring levels, see module-monitoring-levels.

max-history-size

25

(optional) Specifies the maximum number of monitoring records stored for this endpoint. 

jbi-enabled

false

(optional) Determines whether the visibility of this endpoint as a Java Business Integration service is enabled or disabled.