Sun GlassFish Enterprise Server v2.1.1 Administration Reference

availability-service

Configures the availability service. Enables high-availability features, such as session state and stateful session bean state persistence. If the Sun Java System high-availability database (HADB) is installed and you have selected the enterprise profile, session state is persisted to the HADB.


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.


Availability can be enabled or disabled at the following levels:

  1. The server instance (attribute of availability-service). Default is true (enabled).

  2. The EJB or web container (attribute of ejb-container-availability or web-container-availability). Default is true (enabled).

  3. The application (attribute of j2ee-application). Default is false (disabled).

  4. The stand-alone EJB or web module (attribute of ejb-module or web-module). Default is false (disabled).

  5. The stateful session bean. Default is false (disabled). See the Sun GlassFish Enterprise Server v2.1.1 Developer’s Guide.

For availability to be enabled at a given level, it must be enabled at all higher levels, as well. For example, to enable availability at the application level, you must also enable it at the server instance and container levels.

If the HADB is installed and the enterprise profile is selected, availability can also be enabled in the Java Message Service (attribute of jms-availability). The default is false (disabled). JMS availability is disabled if server instance availability is disabled. JMS availability neither affects nor is affected by any other availability levels.

Superelements

config

Subelements

The following table describes subelements for the availability-service element.

Table 1–19 availability-service Subelements

Element 

Required 

Description 

web-container-availability

zero or one 

Enables availability in the web container. 

ejb-container-availability

zero or one 

Enables availability in the EJB container. 

jms-availability

zero or one 

Enables availability in the Java Message Service. 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the availability-service element.

Table 1–20 availability-service Attributes

Attribute 

Default 

Description 

availability-enabled

true

(optional) If set to true, high-availability features apply to all 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.

ha-agent-hosts

none 

Specifies a comma-separated list of server host names or IP addresses where management agents for the high availability store are running. Applicable if HADB is installed and you have selected the enterprise profile. 

ha-agent-port

none 

Specifies the port number where management agents for the high availability store can be contacted. Applicable if HADB is installed and you have selected the enterprise profile. 

ha-agent-password

asadmin password

Specifies the password for access to management agents for the high availability store. Applicable if HADB is installed and you have selected the enterprise profile. 

ha-store-name

cluster name 

(optional) Specifies the HADB database name. Applicable if HADB is installed and you have selected the enterprise profile. 

auto-manage-ha-store

true

(optional) If true, the life cycle of the highly available store is matched with the life cycle of the highly available cluster. The store is started or stopped with the cluster. It is removed when the cluster is deleted. If false, the store life cycle must be manually managed by the administrator. Applicable if HADB is installed and you have selected the enterprise profile.

store-pool-name

jdbc/hastore

(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.

ha-store-healthcheck-enabled

false

(optional) If true, periodic checking is done to detect if the HADB has become available again after a failure. If the health check succeeds, persistence to the HADB is resumed. Applicable if HADB is installed and you have selected the enterprise profile.

ha-store-healthcheck-interval-in-seconds

5

(optional) Specifies the interval at which the HADB's health is checked. The checking begins only after a failure is detected. Applicable if HADB is installed and you have selected the enterprise profile. 

Properties

The following table describes properties for the availability-service element. For more information about replicated session persistence, see web-container-availability and ejb-container-availability.

Table 1–21 availability-service Properties

Attribute 

Default 

Description 

replication_measurement_enabled

false

If true, logs measurements of replication times.

One of these messages appears in the sending instance's log: 


messageSendSucceeded: id = session-id fastAckTime = 8  
   to partner: instance-name
messageSendFailed: id = session-id fastAckTime = 8  
   to partner: instance-name

This message appears in the receiving instance's log: 


messageReceiptSucceeded: bulkId = 1 receiptTime =  12 
   from partner: instance-name

replication_measurement_interval

1

Specifies the frequency of measurement of replication. It must be a positive integer: 1 means every replication, 2 means once every 2 replications, 3 means once every 3 replications, and so on. Applicable only if replication_measurement_enabled is set to true.

rolling-upgrade-backup-directory

instance-dir/rollingupgrade

Specifies where the asadmin backup-session-store command backs up active and replica sessions.