sun.com | docs.sun.com |  | How To Buy | My Sun | Worldwide Sites |

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

User Commands | configure-session-persistence(1)

- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- OPERANDS
- EXAMPLES
- EXIT STATUS
- SEE ALSO

## NAME

| configure-session-persistence - enables configuration of parameters related to session persistence

## SYNOPSIS

| ``configure-session-persistence` --user admin_user [ --password admin_password ] [ --host localhost ] [ --port 4848 ][ --type persistence_type ] [ --frequency frequency ] [ --scope scope ] [ --store jdbc_resource_jndi_name ] [ --property name=value [ :name=value ]* ] instance_name`

## DESCRIPTION

| Configure the session persistence to balance your needs for performance, reliability, and high availability. The `configure-session-persistence` command is available only in the Enterprise Edition of the Sun Java System Application Server. Set the persistence `type` to define the location where session data is stored. The persistence types available are: memory if session persistence for the application server instance is disabled, then `memory` is the default persistence type. `memory` persistence type provides no session persistence in a clustered environment. The `memory` persistence type is intended for development environments and not to be used for production. file provides no session persistence in a clustered environment. Use `file` persistence type to store session data in a file. If the instance becomes unavailable and restarts, it can recover the session information that was last written to the files. The `file` persistence type is meant for development environments and not to be used for production. ha allows you to store session data in the HADB. The `ha` persistence type enables failover of session information between application server instances in a cluster. The session information for each application server instance in a cluster is stored in the HADB. The session information is available to all other instances in the cluster. If an instance in a cluster becomes unavailable, another instance in the cluster can continue to serve the sessions that the now unavailable instance was serving. Set the persistence `frequency` to define the frequency at which the session state is stored in the HADB. The persistence frequencies available are: web-method the session is stored after every web request. Use this frequency when you need very high availability of updated session states. time-based the session is stored at time intervales defined in the reapIntervalSeconds property of the manager property. A better throughput is achieved because the session is stored after a configurable time interval instead of after every web request. Set the persistence `scope` to define how much of the session will be saved. The persistence scope available are: modified-session the session is saved only if it has been modified. If the persistence fewquency is web-method, the entire session is stored at the end of every web request just before sending a response back to the client only if the session has changed from the last time it was stored. If the persistence frequency is time-based, the entire session is stored after each time-based frequency you specify only if the session has changed from the last time it was stored. session the entire session is saved every time session information is saved to the HADB. If the persistence frequency is web-method, the entire session is stored at the end of every web request, just before sending a response back to the client. If the persistence is time-based, the entire session is stored after each time-based frequency you specify. modified-attributes only the modified attributes of the session are saved. Using this mode can improve the throughput and response time significantly for applications for which only a small portion of the session state is modified for any given request. Configure other session persistence properties to fine-tune the session persistence configuration. Modify the properties of manager-properties and of store-properties subelements of the session-manager element in the server.xml file (for instance-level configuration) or in the sun-web.xml file (for application-level configuration). Specify the JNDI name of the JDBC resource for the HADB. If you use the HADB as the persistence store, this information is used to connect to the HADB. Specify the name of the cluster to which the application server instance belongs.

## OPTIONS

| -u --user administrative user associated for the instance. -w --password administrative password corresponding to the administrative user. -H --host host name of the machine hosting the administrative instance. -p --port administrative port number associated with the administrative host. --type type of store to be used for session data. --frequency frequency at which session data should be saved. --scope indicates the portion of session data that is to be saved. --store JNDI name of the persistence store JDBC resource. --property name/value pairs used for specifying session persistence specific attributes to customize the session persistence runtime.

## OPERANDS

| instance_name name of the for which the session persistence has to be configured.

## EXAMPLES

| Example 1. Using configure-session-persistence
    asadmin> configure-session-persistence --user admin --password adminadmin
    --type ha --frequency web-method --scope modified-session --store jdbc/hastore
    --property maxSessions=1000:reapIntervalSeconds=60 server2

## EXIT STATUS

| 0 command executed successfully 1 error in executing the command

## SEE ALSO

| `set`(1as), `clear-session-store`(1as), `create-session-store`(1as)

Enterprise | Go To Top | Last Changed April 2004

Company Info | Contact | Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.