|
|
|
NAME
asadmin-configure-session-persistence, 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
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.
- -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.
-
instance_name
-
name of the for which the session persistence has to be configured.
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
- 0
-
command executed successfully
- 1
-
error in executing the command
asadmin-set(1as), asadmin-clear-session-store(1as), asadmin-create-session-store(1as)
Sun Java System Application Server 7.1 Enterprise
Edition | Go To Top | Last Changed 24 Dec 2003 |
Company Info
|
Contact
|
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
|