Architecture

The session management in the Branch Transformation Toolkit involves the following elements:
session entries
A session entry contains all the information a session requires, such as the session ID, the IP address of the client, and the ID of the session context. See SessionEntry attributes for a detailed description on the information a session entry contains.

A session can contain other sessions, which are called sub-sessions to this session. In a Web container, every top-level session has to be unique. Session cannot be shared across the Java™ Virtual Machine (JVM) binderies.

session tables
A session table is a thread-safe list of session entries. Every Web container has a unique session table instance that manages the sessions specific to this Web container.
CSSessionHandler
The CSSessionHandler manages the session tables and session entries. Toolkit entities access the session entries through the API of the CSSessionHandler.

The architecture to support session management is primarily concerned with passing the session information (session IDs, session context instance ID, and so on) from the application presentation layer to the application logic layer so that processes can run within the session.

When the application logic layer starts, the CHA startup beans or CHA startup servlets create an initial CHA context, which is the root context of the future CHA hierarchy. A user creates a session on the application logic layer using a special user defined process such as a login process. As part of the process, the process creates the session context and returns the session context ID to the invoker, which in turn calls the CSSessionHandler to create the session entry in the application presentation layer.

Once the application logic layer has a session established, the application presentation layers can request to perform business processes in the session. To do this, the application presentation layer must pass the session information with every request.

If WorkAreas is enabled, the application presentation layer puts the session information in a work area. The business process retrieves the session ID from the work area and invokes the CHA to put the session context into the CHA hierarchy.

If WorkArea is disabled, the business request may include the session information in parameter.