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-75
Session Management
Session Management
This section describes the different strategies for session management and the related
manager configuration details and also explains how to configure any manager
element.
This section discusses the following topics:
Sessions in NSJSP
In-Memory Sessions (SessionBasedLoadBalancing = true)
Persistent Manager Sessions (SessionBasedLoadBalancing = false)
Mixed-Mode Sessions
Configuring the Manager Element
Sessions in NSJSP
The NSJSP environment includes multiple NSJSP Server Class processes. In this
environment, each NSJSP Server Class process instance is capable of servicing any
Servlet or JSP request, and creating and managing session objects required for
servicing the Servlet or JSP pages. For user applications that store the application
state in a session object, the session object must be made available for processing
each request. The shopping cart of the JPetStore application is an example of such a
session object.
You can configure NSJSP to keep session objects in process memory or to store them
in a database called the persistent store. When session objects are stored in process
memory, each session object is only available to the process instance that created the
session. In addition, if for any reason the process ends or is terminated, the session
information can be lost. When the session objects are stored in a persistent store, the
session objects are available to any process instance in the NSJSP environment. The
persisted session objects are available, if NSJSP processes stop and even after a
system reload.
In-Memory Sessions (SessionBasedLoadBalancing = true)
If you configure NSJSP to retain session objects in process memory, there must be a
mechanism to route all requests for a particular session to the process that has the
session object in its memory. Such a routing of HTTP requests based on the session
identifier in NSJSP is called session based load balancing. In this case,
SessionBasedLoadBalancing is enabled (that is, the parameter is set to true). This
feature is also referred to as Sticky Sessions. Because NSJSP receives all its requests
from the iTP Secure WebServer's HTTPD process, the routing mechanism is built into
the HTTPD process.
This is the default configuration for NSJSP. Figure 3-5
shows request routing within
NSJSP sessions when SessionBasedLoadBalancing is true.










