NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator's Guide

Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator’s Guide—596210-006
3-95
Determining the Storage Capacity of the Persistent
Store
Example 3-75 shows the SQL session data cleanup script.
Example 3-76 shows an invocation of the nsjsp_cleanSessionData script.
Partitioning the Session Table
In applications where there is a lot of session activity and many sessions are created,
the time consumed for session related database activity can be considerably reduced
by partitioning the session table. Because the value of the session ID is a randomly
generated string, a hash partition will be efficient in distributing data across multiple
partitions. Example 3-77
shows how to create a session table with four partitions that
are spread across four different disks. For better performance, it is recommended that
you configure the partitions on disks with their disk processes in different processors.
Example 3-75. SQL Session Data Cleanup Script
Usage: nsjsp_cleanSessionData nDays
where nDays: Number of days for which session data is to be
preserved/saved. Sessions that have expired more than 'nDays'
ago will be deleted. A value of zero (0) will delete all the
expired sessions.
Example 3-76. Using the nsjsp_cleanSessionData Script
osh> /usr/tandem/webserver/servlet_jsp/conf: nsjsp_cleanSessionData 0
NonStop(tm) Servlets for JavaServer Pages(tm)
Persistent Sessions Cleanup Script
T1222 v6.0
_________________________________________________________________
Cleans up the persistent session data stored in a NonStop(tm) SQL
database for NonStop(tm) Servlets for JavaServer Pages(tm).
Persistent Session Store type is SQL/MX [y(default) or n]:
Please enter the Persistent Session Catalog [T1222CAT.T1222SCH] :
nsjspcat.nsjspsch
Persistent Sessions Catalog = nsjspcat.nsjspsch
Persistent Sessions Table = nsjspcat.nsjspsch.SessData
Hewlett-Packard NonStop(TM) SQL/MX Conversational Interface 2.2
(c) Copyright 2006 Hewlett-Packard Development Company, LP.
>>DELETE FROM nsjspcat.nsjspsch.SessData
+>WHERE (Juliantimestamp(current) -
+> Juliantimestamp(timestamp '1970-01-01:00:00:00.00') -
+> (1000 * lastaccessed) ) >
+> (1000 * 1000 * (maxinactiveinterval + (0 * 24 * 60 * 60)) );
--- 0 row(s) deleted.