Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 8247 invoked by uid 500); 26 Sep 2001 01:38:32 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 8238 invoked by uid 500); 26 Sep 2001 01:38:31 -0000 Delivered-To: apmail-jakarta-tomcat-4.0-cvs@apache.org Date: 26 Sep 2001 01:38:08 -0000 Message-ID: <20010926013808.8172.qmail@icarus.apache.org> From: craigmcc@apache.org To: jakarta-tomcat-4.0-cvs@apache.org Subject: cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config manager.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N craigmcc 01/09/25 18:38:08 Modified: webapps/tomcat-docs/config manager.xml Log: Port documentation update about JDBCStore. Revision Changes Path 1.2 +284 -2 jakarta-tomcat-4.0/webapps/tomcat-docs/config/manager.xml Index: manager.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/manager.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- manager.xml 2001/08/25 20:06:30 1.1 +++ manager.xml 2001/09/26 01:38:08 1.2 @@ -75,6 +75,14 @@ +

Tomcat provides two standard implementations of Manager + for use - the default one stores active sessions, while the optional one + stores active sessions that have been swapped out (in addition to saving + sessions across a restart of Tomcat) in a storage location that is selected + via the use of an appropriate Store nested element.

+ +

Standard Manager Implementation

+

The standard implementation of Manager is org.apache.catalina.session.StandardManager. It supports the following additional attributes (in addition to the @@ -95,7 +103,7 @@ -

The level of debugging detail logged by this Engine +

The level of debugging detail logged by this Manager to the associated Logger. Higher numbers generate more detailed output. If not specified, the default debugging detail level is zero (0).

@@ -130,6 +138,110 @@ +

Persistent Manager Implementation

+ +

WARNING - Use of this Manager implementation + has not been thoroughly tested, and should be considered experimental! +

+ +

The persistent implementation of Manager is + org.apache.catalina.session.PersistentManager. In + addition to the usual operations of creating and deleting sessions, a + PersistentManager has the capability to swap active (but + idle) sessions out to a persistent storage mechanism, as well as to save + all sessions across a normal restart of Tomcat. The actual persistent + storage mechanism used is selected by your choice of a + Store element nested inside the Manager + element - this is required for use of PersistentManager.

+ +

This implementation of Manager supports the following attributes in + addition to the Common Attributes + described earlier.

+ + + + +

Name of the Message Digest algorithm used to calculate + session identifiers produced by this Manager. This value must + be supported by the java.security.MessageDigest class. + If not specified, the default value is "MD5".

+
+ + +

The number of seconds between checks for expired sessions + for this Manager. The default value is 60 seconds.

+
+ + +

Java class name of the implementation to use. This class must + implement the org.apache.catalina.Manager interface. + You must specify + org.apache.catalina.session.PersistentManager to use + this manager implementation.

+
+ + +

The level of debugging detail logged by this Manager + to the associated Logger. Higher numbers + generate more detailed output. If not specified, the default + debugging detail level is zero (0).

+
+ + +

A String value that is utilized when seeding the random number + generator used to create session identifiers for this Manager. + If not specified, a semi-useful value is calculated, but a long + String value should be specified in security-conscious + environments.

+
+ + +

The maximum number of active sessions that will be created by + this Manager, or -1 (the default) for no limit.

+
+ + +

The time interval (in seconds) since the last access to a session + before it is eligible for being persisted to the session store, or + -1 to disable this feature. By default, this feature is + disabled.

+
+ + +

The time interval (in seconds) since the last access to a session + before it should be persisted to the session store, and + passivated out of the server's memory, or -1 to disable + this feature. If this feature is enabled, the time interval specified + here should be equal to or longer than the value specified for + maxIdleBackup. By default, this feature is disabled.

+
+ + +

The time interval (in seconds) since the last access to a session + before it will be eligible to be persisted to the session store, and + passivated out of the server's memory, or -1 for this + swapping to be available at any time. If specified, this value should + be less than that specified by maxIdleSwap. By default, + this value is set to -1.

+
+ + +

Java class name of the java.util.Random + implementation class to use. If not specified, the default value is + java.security.SecureRandom.

+
+ + +

Should all sessions be persisted and reloaded when Tomcat is shut + down and restarted (or when this application is reloaded)? By default, + this attribute is set to true.

+
+ +
+ +

In order to successfully use a PersistentManager, you must nest inside + it a <Store> element, as described below.

+
@@ -137,8 +249,178 @@
+ +

Standard Manager Implementation

-

No components may be nested inside a Manager element.

+

If you are using the Standard Manager Implementation + as described above, no elements may be nested inside your + <Manager> element.

+ +

Persistent Manager Implementation

+ +

If you are using the Persistent Manager Implementation + as described above, you MUST nest a + <Store> element inside, which defines the + characteristics of the persistent data storage. Two implementations + of the <Store> element are currently available, + with different characteristics, as described belowl

+ +
File Based Store
+ +

The File Based Store implementation saves swapped out + sessions in individual files (named based on the session identifier) + in a configurable directory. Therefore, you are likely to encounter + scalability problems as the number of active sessions increases, and + this should primarily be considered a means to easily experiment.

+ +

To configure this, add a <Store> nested inside + your <Manager> element with the following attributes: +

+ + + + +

The interval (in seconds) between checks for expired sessions + among those sessions that are currently swapped out. By default, + this interval is set to 60 seconds (one minute).

+
+ + +

Java class name of the implementation to use. This class must + implement the org.apache.catalina.Store interface. You + must specify + org.apache.catalina.session.FileStore + to use this implementation.

+
+ + +

The level of debugging detail logged by this Store + to the associated Logger. Higher numbers + generate more detailed output. If not specified, the default + debugging detail level is zero (0).

+
+ + +

Absolute or relative (to the temporary work directory for this web + application) pathname of the directory into which individual session + files are written. If not specified, the temporary work directory + assigned by the container is utilized.

+
+ +
+ + +
JDBC Based Store
+ +

The JDBC Based Store implementation saves swapped out + sessions in individual rows of a preconfigured table in a database + that is accessed via a JDBC driver. With large numbers of swapped out + sessions, this implementation will exhibit improved performance over + the File Based Store described above.

+ +

To configure this, add a <Store> nested inside + your <Manager> element with the following attributes: +

+ + + + +

The interval (in seconds) between checks for expired sessions + among those sessions that are currently swapped out. By default, + this interval is set to 60 seconds (one minute).

+
+ + +

Java class name of the implementation to use. This class must + implement the org.apache.catalina.Store interface. You + must specify + org.apache.catalina.session.JDBCStore + to use this implementation.

+
+ + +

The connection URL that will be handed to the configured JDBC + driver to establish a connection to the database containing our + session table.

+
+ + +

The level of debugging detail logged by this Store + to the associated Logger. Higher numbers + generate more detailed output. If not specified, the default + debugging detail level is zero (0).

+
+ + +

Java class name of the JDBC driver to be used.

+
+ + +

Name of the database column, contained in the specified + session table, that contains the serialized form of all session + attributes for a swapped out session. The column type must accept + a binary object (typically called a BLOB).

+
+ + +

Name of the database column, contained in the specified + session table, that contains the session identifier of the + swapped out session. The column type must accept character + string data of at least as many characters as are contained + in session identifiers created by Tomcat (typically 32).

+
+ + +

Name of the database column, contained in the specified + session table, that contains the lastAccessedTime + property of this session. The column type must accept a + Java long (64 bits).

+
+ + +

Name of the database column, contained in the specified + session table, that contains the maxInactiveInterval + property of this session. The column type must accept a + Jave integer (32 bits).

+
+ + +

Name of the database table to be used for storing swapped out + sessions. This table must contain (at least) the database columns + that are configured by the other attributes of this element.

+
+ + +

Name of the database column, contained in the specified + session table, that contains a flag indicating whether this + swapped out session is still valid or not. The column type + must accept a single character.

+
+ +
+ +

Before attempting to use the JDBC Based Store for the first time, + you must create the table that will be used to store swapped out sessions. + Detailed SQL commands vary depending on the database you are using, but + a script like this will generally be required:

+ + +create table tomcat_sessions ( + session_id varchar(100) not null primary key, + valid_session char(1) not null, + max_inactive int not null, + last_access bigint not null, + session_data mediumblob +); + + +

In order for the JDBC Based Store to successfully connect to your + database, the JDBC driver you configure must be visible to Tomcat's + internal class loader. Generally, that means you must place the JAR + file containing this driver into the $CATALINA_HOME/server/lib + directory (if your applications do not also need it) or into the + $CATALINA_HOME/common/lib directory (if you wish to share + this driver with your web applications.