Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide

- Previous: HTTP Session Failover
- Next: Configuring Availability for an Individual Application or EJB Module

## Configuring Availability for the EJB Container

### To Enable Availability for the EJB Container

1. Select the EJB Container Availability tab.

2. Check the Availability Service box.

   To disable availability, uncheck the box.

3. Change other settings as described in Availability Settings

4. Click on the Save button.

5. Restart the server instance.

##### Equivalent asadmin command

To enable availability for the EJB container use the `asadmin set` command to set the following three properties for the configuration:

-     availability-service.ejb-container-availability.
      availability-enabled

-     availability-service.ejb-container-availability.
      sfsb-persistence-type

-     availability-service.ejb-container-availability.
      sfsb-ha-persistence-type

For example, if `config1` is the configuration name, use the following commands:

`asadmin set --user admin --passwordfile password.txt --host localhost --port 4849config1.availability-service.ejb-container-availability.availability-enabled="true"`

`asadmin set --user admin --passwordfile password.txt --host localhost --port 4849config1.availability-service.ejb-container-availability.sfsb-persistence-type="file"`

`asadmin set --user admin --passwordfile password.txt --host localhost --port 4849config1.availability-service.ejb-container-availability.sfsb-ha-persistence-type="ha"`

### Availability Settings

The EJB Container Availability tab of the Availability Service enables you to change these settings:

HA Persistence Type: Specifies the session persistence and passivation mechanism for SFSBs that have availability enabled. Allowed values are `file` (the file system) and `ha` (HADB). For production environments that require session persistence, use `ha`, the default.

SFSB Persistence Type: Specifies the passivation mechanism for SFSBs that do not have availability enabled. Allowed values are `file` (the default) and `ha`.

If either Persistence Type is set to `file`, the EJB container specifies the file system location where the passivated session bean state is stored. Checkpointing to the file system is useful for testing but is not for production environments. For more information, see To configure the store properties in Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide.

HA persistence enables a cluster of server instances to recover the SFSB state if any server instance fails. HADB is also used as the passivation and activation store. Use this option in a production environment that requires SFSB state persistence. For more information, see configure-ha-cluster(1).

SFSB Store Pool Name: You can change the SFSB Store Pool Name if you changed the JDBC resource used for connections to the HADB for session persistence. For details, see configure-ha-cluster(1).

### Configuring the SFSB Session Store When Availability Is Disabled

If availability is disabled, the local file system is used for SFSB state passivation, but not persistence. To change where the SFSB state is stored, change the Session Store Location setting in the EJB container. For more information, see To configure the store properties in Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide..

- Previous: HTTP Session Failover
- Next: Configuring Availability for an Individual Application or EJB Module

- © 2010, Oracle Corporation and/or its affiliates