Links Top Level Elements Executors Connectors Containers Nested Components Cluster Elements web.xml Other | The Manager ComponentIntroduction |
The Manager element represents the session
manager that will be used to create and maintain HTTP sessions
as requested by the associated web application.
A Manager element MAY be nested inside a
Context component. If it is not included,
a default Manager configuration will be created automatically, which
is sufficient for most requirements, — see
Standard Manager Implementation below for the details
of this configuration.
|
Attributes |
Common Attributes |
All implementations of Manager
support the following attributes:
Attribute | Description |
---|
className |
Java class name of the implementation to use. This class must
implement the org.apache.catalina.Manager interface.
If not specified, the standard value (defined below) will be used.
| distributable |
Set to true to ask the session manager to enforce
the restrictions described in the Servlet Specification on
distributable applications (primarily, this would mean that all
session attributes must implement java.io.Serializable ).
Set to false (the default) to not enforce these
restrictions.
NOTE - The value for this property is inherited
automatically based on the presence or absence of the
<distributable> element in the web application
deployment descriptor (/WEB-INF/web.xml ).
| maxActiveSessions |
The maximum number of active sessions that will be created by
this Manager, or -1 (the default) for no limit.
When the limit is reached, any attempt to create a new session
(e.g. with HttpServletRequest.getSession() call)
will fail with an IllegalStateException .
| maxInactiveInterval |
The initial maximum time interval, in seconds,
between client requests before a session is invalidated. A negative value
will result in sessions never timing out. If the attribute is not provided,
a default of 1800 seconds (30 minutes) is used.
This attribute provides the initial value whenever a
new session is created, but the interval may be dynamically
varied by a servlet via the
setMaxInactiveInterval method of the HttpSession object.
| sessionIdLength |
The length of session ids created by this Manager, measured in bytes,
excluding subsequent conversion to a hexadecimal string and
excluding any JVM route information used for load balancing.
The default is 16. You should set the length on a nested
SessionIdGenerator element instead.
|
|
Standard Implementation |
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
common attributes listed above):
Attribute | Description |
---|
pathname |
Absolute or relative (to the work directory for this |
|
|
|