NonStop Servlets for JavaServer Pages (NSJSP) 5.0 System Administrator's Guide
Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-003
3-49
Configuring the Manager for Sessions Support
Alternatively, if you have already created the NonStop SQL table, you can use the
ALTER TABLE command to create or add partitions on-the-fly. Example 3-34 shows
how to add the same two partitions (shown in Example 3-31 on page 3-46) using the
ALTER TABLE command in the NonStop SQL Command Interpreter (SQLCI).
Note that the session_id field used above as the partitioning key contains only
hexadecimal characters (0 through 9 or A through F). As a result,
•
All records that have session IDs starting with 0 through 4 are stored in the main
table.
•
All records that have session IDs starting with 5 through 9 are stored in the
partition indicated by =TheFirstSessionPartition.
•
All records that have session IDs starting with A through F are stored in the
partition indicated by =TheSecondSessionPartition.
Configuring the Manager for Sessions Support
To configure NSJSP for persistent sessions support, create a <Manager> element and
nest it under a <Context> element in your Context configuration file. All
implementations of the <Manager> element support these attributes:
Example 3-33. Adding Extra Partitions to Support Persistent Sessions
sqlci> create table =TheT1222SessionCatalog.SessData (
session_id VARCHAR(128) NO DEFAULT NOT NULL,
process_name VARCHAR(8) NO DEFAULT NOT NULL,
rec_number INTEGER UNSIGNED NO DEFAULT NOT NULL,
app_name VARCHAR(255) NO DEFAULT NOT NULL,
session_data VARCHAR(3712) CHARACTER SET ISO88591,
valid SMALLINT UNSIGNED NO DEFAULT,
maxinactiveinterval INTEGER NO DEFAULT,
lastaccessed LARGEINT NO DEFAULT
primary key (session_id, process_name, rec_number) )
partition (=TheFirstSessionPartition.SessData FIRST KEY “5”
catalog =TheT1222SessionCatalog,
=TheSecondSessionPartition.SessData FIRST KEY “A”
catalog =TheT1222SessionCatalog)
organization key sequenced
audit
catalog =TheT1222SessionCatalog;
Example 3-34. Adding Partitions Using the SQLCI ALTER TABLE Command
sqlci> alter table =TheT1222SessionCatalog.SessData add partition
=TheFirstSessionPartition.SessData FIRST KEY “5”
catalog =TheT1222SessionCatalog;
sqlci> alter table =TheT1222SessionCatalog.SessData add partition
=TheSecondSessionPartition.SessData FIRST KEY “A”
catalog =TheT1222SessionCatalog;










