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.

WebSphere Application Server provides the following session mechanisms in a distributed environment:
  • Database session persistence, where sessions are stored in the database specified.
  • Memory-to-memory session replication, where sessions are stored in one or more specified WebSphere Application Server instances or profiles.
  • WebSphere extreme Scale session replication, where sessions are stored in a data grid.

When a session contains attributes that implement HttpSessionActivationListener, notification occurs anytime the session is activated (that is, session is read to the memory cache) or passivated (that is, session leaves the memory cache). Passivation can occur because of a server shutdown or when the session memory cache is full and an older session is removed from the memory cache to make room for a newer session. It is not guaranteed that a session is passivated in one application server prior to activation in another application.