IBM


2.4.1 HTTP sessions and the session management facility

In the case of an HTTP client interacting with a servlet, the state information associated with a series of client requests is represented as an HTTP session, and identified by a session ID. The Servlet 2.3 specification defines that, after a session has been created, all following requests need to go to the same appserver that created the session.

However, in a clustered environment, there is more than one appserver that can serve the client request. Therefore, the Web server plug-in needs to read a request and be able to identify which cluster member should handle it. Session identifiers are used to do this - they allow the plug-in to pick the correct cluster member and Web container to retrieve the current session object.

The session manager module that is part of each Web container is responsible for managing HTTP sessions, providing storage for session data, allocating session IDs, and tracking the session ID associated with each client request.

The session manager provides for the storage of session-related information either in-memory within the appserver, in which case it cannot be shared with other appservers, in a back-end database, shared by all appservers, or by using memory-to-memory replication.


Redbooks ibm.com/redbooks

Next