InfoCenter Home >
4: Developing applications >
4.4: Personalizing applications >
4.4.1: Tracking sessions >
4.4.1.1: Session programming model and environment >
4.4.1.1.5: Using sessions in a clustered environment

4.4.1.1.5: Using sessions in a clustered environment

Consider the following issues regarding how session management works within a clustered environment. Clustered environments include any environments in which requests are being handled by multiple Web servers, multiple application servers, or both. See section 7 for more about clustering and workload management.

For use in a clustered environment, objects placed in persistent sessions must be serializable

To make your applications portable to a clustered environment, you must make any objects placed in a persistent session serializable. If you place an object that does not implement the Serializable interface, you lack a way to propagate the object with a given session, disallowing proper persistence among servlets in the cluster.

For additional notes on programming for clustered environments, see the related information.

Session binding occurs on a certain application server in the cluster

When HttpSessionBindingListener and HttpSessionBindingEvent are used in a clustered Web server environment, the event is fired in the application server on which the session is currently being processed. The action will occur in situations where:

  • A listener is put into a session
  • A listener is removed from a session
  • The servlet explicitly invalidates the session that contains listeners

If the session times out, this (unbound) event may be fired in any one of the application servers in the cluster.

Certain changes might require restarting all Session Managers in a cluster

See the related information for details.

Go to previous article: Deciding between single-row and multirow schema for sessions Go to next article: Limitations in session support

 

 
Go to previous article: Deciding between single-row and multirow schema for sessions Go to next article: Limitations in session support