Attributes Shared by Different Types of Session Persistence Using Memory-based, Single-server, Non-replicated Persistent Storage

10-4 Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server The first four are discussed here; in-memory replication is discussed in HTTP Session State Replication, in Using Clusters for Oracle WebLogic Server File, JDBC, cookie-based, and memory single-server, non-populated session persistence have some common properties. Each persistence method has its own set of configurable parameters, as discussed in the following sections. These parameters are subelements of the session-descriptor element in the weblogic.xml deployment descriptor file.

10.3.1 Attributes Shared by Different Types of Session Persistence

This section describes parameters common to file and JDBC-based persistence. You can configure the number of sessions that are held in memory by defining the following parameters in the session-descriptor element in the weblogic.xml deployment descriptor file. These parameters are only applicable if you are using session persistence: ■ cache-size—Limits the number of cached sessions that can be active in memory at any one time. If you expect high volumes of simultaneous active sessions, you do not want these sessions to soak up the RAM of your server because this may cause performance problems swapping to and from virtual memory. When the cache is full, the least recently used sessions are stored in the persistent store and recalled automatically when required. If you do not use persistence, this property is ignored, and there is no soft limit to the number of sessions allowed in main memory. By default, the number of cached sessions is 1028. To turn off caching, set this to 0. See cache-size in Section B.10, session-descriptor . ■ invalidation-interval-secs—Sets the time, in seconds, that WebLogic Server waits between doing house-cleaning checks for timed-out and invalid sessions, and deleting the old sessions and freeing up memory. Use this element to tune WebLogic Server for best performance on high traffic sites. See invalidation-interval-secs in Section B.10, session-descriptor . The minimum value is every second 1. The maximum value is once a week 604,800 seconds. If not set, the attribute defaults to 60 seconds.

10.3.2 Using Memory-based, Single-server, Non-replicated Persistent Storage

When you use memory-based storage, all session information is stored in memory and is lost when you stop and restart WebLogic Server. To use memory-based, single-server, non-replicated persistent storage, set the persistent-store-type parameter in the session-descriptor element in the weblogic.xml deployment descriptor file to memory. See Section B.10, session-descriptor .

10.3.3 Using File-based Persistent Storage