Managing Session Persistence Session Management

Tuning Web Applications 18-3

18.2.1 Managing Session Persistence

WebLogic Server offers many session persistence mechanisms that cater to the differing requirements of your application, including Async-replicated and Async-JDBC modes. The session persistence mechanisms are configurable at the Web application layer. Which session management strategy you choose for your application depends on real-world factors like HTTP session size, session life cycle, reliability, and session failover requirements. For example, a Web application with no failover requirements could be maintained as a single memory-based session; whereas, a Web application with session fail-over requirements could be maintained as replicated sessions or JDBC-based sessions, based on their life cycle and object size. In terms of pure performance, replicated session persistence is a better overall choice when compared to JDBC-based persistence for session state. However, replicated-based session persistence requires the use of WebLogic clustering, so it isnt an option in a single-server environment. On the other hand, an environment using JDBC-based persistence does not require the use of WebLogic clusters and can maintain the session state for longer periods of time in the database. One way to improve JDBC-based session persistence is to optimize your code so that it has as high a granularity for session state persistence as possible. Other factors that can improve the overall performance of JDBC-based session persistence are: the choice of database, proper database server configuration, JDBC driver, and the JDBC connection pool configuration. For more information on managing session persistence, see: ■ Configuring Session Persistence in Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server ■ HTTP Session State Replication in Using Clusters for Oracle WebLogic Server ■ Using a Database for Persistent Storage JDBC Persistence in Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server

18.2.2 Minimizing Sessions