Task overview: Managing HTTP sessions
IBM® WebSphere® Application Server provides a service for managing HTTP sessions, Session Manager. The key activities for session management are summarized in this topic.
About this task
Before you begin these steps, make sure that you are familiar with the programming model for accessing HTTP session support in the applications following the Servlet 3.0 API.
Procedure
- Plan your approach to session management, which could include session tracking, session recovery, and session clustering.
- Create or modify your own applications to use session support to maintain sessions on behalf of web applications.
- Assemble your application.
- Deploy your application.
- Ensure the administrator appropriately configures session management in the administrative domain.
- Adjust configuration settings and perform other tuning activities for optimal use of sessions in your environment.
次主題
- Sessions
A session is a series of requests to a servlet, originating from the same user at the same browser. - Developing session management in servlets
- Assembling so that session data can be shared
By default, the session management facility supports session scoping by web module in accordance with the Servlet 2.3 and later API specification. Only servlets in the same web module can access the data associated with a particular session. However, you can use the IBMApplicationSession object or the IBM extension, shared session context, to share data outside of the web module scope. - Session security support
You can integrate HTTP sessions and security in WebSphere Application Server. When security integration is enabled in the session management facility and a session is accessed in a protected resource, you can access that session only in protected resources from then on. Session security (security integration) is enabled by default. - Session management support
WebSphere Application Server provides facilities, grouped under the heading Session Management, that support the javax.servlet.http.HttpSession interface described in the Servlet API specification. - Configuring session management by level
When you configure session management at the web container level, all applications and the respective web modules in the web container normally inherit that configuration, setting up a basic default configuration for the applications and included web modules. However, you can set up different configurations individually for specific applications and web modules that vary from the web container default. These different configurations override the default for these applications and web modules only. - Session tracking options
HTTP session support also involves session tracking. You can use cookies, URL rewriting, or Secure Sockets Layer (SSL) information for session tracking. - Configuring session tracking
- Configuring session tracking for Wireless Application Protocol (WAP) devices
Applications that run in a web container use sessions to keep track of individual users. Because most Wireless Application Protocol (WAP) devices do not support cookies, you can configure WAP devices to use URL rewriting to track sessions. - Distributed sessions
In a distributed environment, you can save sessions in a database using database session persistence, store sessions in multiple WebSphere Application Server instances using memory-to-memory session replication, or store sessions in an ObjectGrid using WebSphere Extreme Scale. - Session recovery support
For session recovery support, WebSphere Application Server provides distributed session support in the form of database sessions and memory-to-memory replication. You can use session recovery support when the user's session data must be maintained across a server restart or when the user's session data is too valuable to lose through an unexpected server failure. - 配置資料庫階段作業持續性
您可以針對資料庫階段作業持續性,配置一個資料庫來收集階段作業資料。 - Memory-to-memory replication
Memory-to-memory session replication is the session replication to another WebSphere Application Server. In this mode, sessions can replicate to one or more Application Servers to address HTTP Session single point of failure (SPOF). - Memory-to-memory session partitioning
Session partitioning gives the administrator the ability to filter or reduce the number of destinations that the session object gets sent to by the replication service. You can also configure session partitioning by specifying the number of replicas on the replication domain. The single replica option is chosen by default. Since the number of replicas is global for the entire replication domain, all the session managers connected to the replication domain use the same setting. - Clustered session support
A clustered environment supports load balancing, where the workload is distributed among the application servers that compose the cluster. - Configuring memory-to-memory replication for the peer-to-peer mode (default memory-to-memory replication)
You can use the peer-to-peer configuration to attain session affinity using a combination of servers that are configured as both client and server. The peer-to-peer configuration contains a single replica by default. - Configuring memory-to-memory replication for the client/server mode
You can use the client/server configuration to attain session affinity using a combination of servers that are configured as client only and server only. - Session management tuning
WebSphere Application Server session support has features for tuning session performance and operating characteristics, particularly when sessions are configured in a distributed environment. These options support the administrator flexibility in determining the performance and failover characteristics for their environment. - HTTP sessions: Resources for learning
- Scheduled invalidation
Instead of relying on the periodic invalidation timer that runs on an interval based on the session timeout parameter, you can set specific times for the session management facility to scan for invalidated sessions in a distributed environment. - Configuring write contents
In session management, you can configure which session data is written to the database or to another WebSphere instance, depending on whether you are using database persistent sessions or memory to memory replication. You can either write only session data properties that have been updated through setAttribute method and removeAttribute method calls or you can write all session data properties. - Configuring write frequency
In the session management facility, you can configure the frequency for writing session data to the database or to a WebSphere instance, depending on whether you use database distributed sessions or memory-to-memory replication. You can write session data using the end of service servlet, manual update or time based update options. - Base in-memory session pool size
The base in-memory session pool size number depends on the session support configuration. - HTTP session invalidation
HTTP sessions are invalidated by calling the invalidate method on the session object or by specifying a specific time interval using the MaxInactiveInterval property. - Write operations
You can manually control when modified session data is written out to the database or to another WebSphere Application Server instance by using the sync method in the com.ibm.websphere.servlet.session.IBMSession interface. The manual update, end of service servlet and the time based write frequency modes are available to tune write frequency of session data. - Tuning parameter settings
Use this page to set tuning parameters for distributed sessions. - Tuning parameter custom settings
Use this page to customize tuning parameters for distributed sessions. - Best practices for using HTTP sessions
This topic presents best practices for the implementation of HTTP sessions. - HTTP session manager troubleshooting tips
Use troubleshooting tips for problems creating or using HTTP sessions with your web application hosted by WebSphere Application Server. - HTTP session problems
Use troubleshooting information for problems when creating or using Hypertext Transfer Protocol (HTTP) sessions.


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tprs_sep1
檔名:tprs_sep1.html