Apple WebObjects 3.5 User Manual

Page 67

Advertising
background image

The Classes in the Request-Response Loop

67

Figure 15. Request-Response Loop: Session Level

The objects dedicated to session management ensure that state with
sessionwide scope persists between cycles of the request-response loop.

Two classes are involved at this level:

WOSession (in Java, WebSession)

Encapsulates the state of a session. WOSession objects persist
between the cycles of the request-response loop. WOSession objects
store (and restore) the pages of a session, the values of session
variables, and any other state that components want to persist
throughout a session. The number of pages stored by the session
object is dependent on the page-cache size set in WOApplication.
Setting the page-cache size is described in the chapter “Managing
State” (page 109). Each session object is identified by a unique session
ID, which is reflected in the URL.

WOSessionStore (in Java, SessionStore)

Provides the strategy or mechanism through which WOSession objects
are made persistent. A WOSessionStore object stores session objects in
the server or in the page (which can include Netscape cookies), and
restores them upon request by the application.

adaptor

Request

Response

HTTP server

application

session

store

session 1

session 2

Advertising