NonStop Servlets for JSP System Administrator's Guide

Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide525644-001
3-43
Cleaning Up the NonStop SQL Session Data
Example 3-31 shows how to use the NSJSPPersistentManager.
Cleaning Up the NonStop SQL Session Data
Sessions saved by the NonStopSQLJDBCStore to a NonStop SQL database may
never get cleaned up and remain as orphan sessions. This can happen when
the sessions are saved on an NSJSP container restart and never accessed after
the restart,
or they may have been backed up or swapped out to the NonStop SQL database
and not accessed again after the NSJSP container failed and was restarted.
Over time, it is possible for the database to grow huge.
The iTPWS_INSTALL_DIR/bin/nsjsp_cleanSessionData script enables you to
clean up the sessions that have expired prior to a specified number of days (the nDays
parameter). Running this script periodically as part of a cron job or any other
administrative process will enable you to clean up your session database, as with time
it is possible that it may grow very big.
Note. The NonStop SQL catalog must be created on a TMF-audited data volume (disk). In
order to save the persistent session data to the persistent store, you should use the
iTPWS_INSTALL_DIR/conf/nsjsp_stop script instead of the stop script (see Stopping
NSJSP on page 2-6 for more details).
Example 3-31. Using the NSJSPPersistentManager
<Context path="/servlet_jsp/examples" docbase="examples" debug ="0"
reloadable="false" crossContext="true"
<Manager>
className="org.apache.catalina.session.NSJSPPersistentManager"
debug="0" saveOnRestart="true"
checkInterval="300"
maxActiveSessions="-1"
minIdleSwap="-1"
maxIdleSwap="600"
maxIdleBackup="-1">
<Store
className="org.apache.catalina.session.NonStopSQLJDBCStore"
debug="0" driverName="com.tandem.sqlmp.SQLMPDriver"
connectionURL="jdbc:sqlmp:"
sessionTable="$SYSTEM.T1222CAT.SessData"
sessionIdCol="session_id"
sessionProcessNameCol="process_name"
sessionRecNumberCol="rec_number"
sessionDataCol="session_data"
sessionValidCol="valid"
sessionMaxInactiveCol="maxinactiveinterval"
sessionLastAccessedCol="lastaccessed" />
</Manager>
</Context>