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

Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator’s Guide544548-004
3-43
Configuring the Session Manager to support
Persistent Sessions
Use the following OSS command to forward the input file to the NonStop SQL
Command Interpreter (SQLCI):
osh> mxci < nsjsp_createSessionStore_mx.sql.
Configuring the Session Manager to support Persistent
Sessions
To configure NSJSP to support Persistent Sessions, create a <Manager> element and
nest it under a <Context> element in your Context configuration file. For details on
configuration parameters of the manager for session support, refer
http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html.
NSJSP provides two implementations of the Session Manager application:
Example 3-20. SQL/MP script to create a Persistent Store
create catalog $data01.nsjspcat secure "OOOO";
--
-- Create the NonStop(tm) SQL Table in the above catalog for storing the
-- NonStop(tm) Servlets for JavaServer Pages(tm) persistent session data.
--
create table $data01.nsjspcat.sessdata (
session_id VARCHAR(48) NO DEFAULT NOT NULL,
process_name VARCHAR(8) NO DEFAULT NOT NULL,
rec_number INTEGER UNSIGNED NO DEFAULT NOT NULL,
app_name VARCHAR(150) NO DEFAULT NOT NULL,
session_data VARCHAR(3600) CHARACTER SET ISO88591,
valid SMALLINT UNSIGNED NO DEFAULT,
maxinactiveinterval INTEGER NO DEFAULT,
lastaccessed LARGEINT NO DEFAULT,
primary key (session_id, process_name, rec_number) )
catalog $data01.nsjspcat;
Example 3-21. SQL/MX script to create a Persistent Store
create catalog nsjspcat;
set catalog nsjspcat;
create schema nsjspsch;
set schema nsjspsch;
--
-- Create the NonStop(tm) SQL Table in the above catalog for storing the
-- NonStop(tm) Servlets for JavaServer Pages(tm) persistent session data.
--
create table SessData (
session_id VARCHAR(48) NO DEFAULT NOT NULL,
process_name VARCHAR(8) NO DEFAULT NOT NULL,
rec_number INTEGER UNSIGNED NO DEFAULT NOT NULL,
app_name VARCHAR(150) NO DEFAULT NOT NULL,
session_data VARCHAR(3600) CHARACTER SET ISO88591,
valid SMALLINT UNSIGNED NO DEFAULT,
maxinactiveinterval INTEGER NO DEFAULT,
lastaccessed LARGEINT NO DEFAULT,
primary key (session_id, process_name, rec_number) );