Sun Java System Web Server 7.0 Update 6 Developer's Guide to Java Web Applications
MMap Session Manager (UNIX Only)
MMap is a persistent memory map (mmap),
file-based session manager that works in both single-process and multi-process
mode.
Note – The MaxProcs directive in the magnus.conf file determines whether the server is running in single-process
or multi-process mode. The Maxprocs is deprecated in Web Server 7.0.
Enabling MMap
You can enable MMap to change its default parameters.
You can also enable MMap for a particular context if the
server is running in single-process mode. To do so, edit the sun-web.xml file for the web application as in the following example. Note
that persistence-type must be set to mmap.
<sun-web-app>
...
<session-config>
<session-manager persistence-type=”mmap”>
...
</session-manager>
...
</session-config>
...
</sun-web-app>
For more information about the sun-web.xml file,
see Chapter 9, Deploying Web Applications.
Manager Properties for MMap
The following table describes manager-properties properties
for the MMap session manager.
Table 6–7
manager-properties Properties
for
MMap
Property Name
|
Default Value
|
Description
|
maxSessions
|
1000
|
The maximum number of sessions maintained by the session manager at
any given time. The session manager refuses to create any more new sessions
if maxSessions number of sessions are already present at
that time.
|
maxValuesPerSession
|
10
|
The maximum number of values or objects a session can hold.
|
maxValueSize
|
4096
|
The maximum size of each value or object that can be stored in the session.
|
timeOut
|
1800
|
The amount of time in seconds after a session is last accessed by the
client before the session manager destroys it. Those sessions that haven’t
been accessed for at least timeOut seconds are destroyed
by the reaper method.
|
reapInterval
|
600
|
The amount of time in seconds that the SessionReaper thread
sleeps before calling the reaper method again.
|
maxLocks
|
1
|
The number of cross-process locks to use for synchronizing access to
individual sessions across processes. The default value is used if the value 0 is specified. This parameter is ignored in single-process mode.
|
Note –
MMap can only store objects that implement java.io.Serializable.