State in the Server
Storing state in memory on the application server is the default behavior, so no setup is necessary. However, if you want access to the session store object, you can include the following code in the application object's initialization method:
// WebScript example id sessionStore = [WOSessionStore serverSessionStore]; [self setSessionStore:sessionStore]; // Java example SessionStore sessionStore = SessionStore.serverSessionStore(); this.setSessionStore(sessionStore);When state is stored in the server, the application keeps a cache of session objects in the session store, and each session keeps a cache of component objects. Because these objects can take up a lot of memory, WebObjects gives you ways to control the amount of memory this state storage mechanism consumes:
- Setting session time-outs (see "Controlling Session State")
- Setting the size of the page cache (see "Adjusting the Page Cache Size")
- Page uniquing by implementing pageWithName: in the session object (see "pageWithName: and Page Caching")
Table of Contents Next Section